1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

91618 Commits

Author SHA1 Message Date
Nadav Rotem
1ba2292746 Update the release notes about the min/max reductions that Arnold added.
llvm-svn: 180805
2013-04-30 21:04:04 +00:00
Akira Hatanaka
326a351350 [mips] Test for r179873.
Patch by Zoran Jovanovic.

llvm-svn: 180804
2013-04-30 20:48:49 +00:00
Jim Grosbach
940f9dc094 InstCombine: Fold more shuffles of shuffles.
Always fold a shuffle-of-shuffle into a single shuffle when there's only one
input vector in the first place. Continue to be more conservative when there's
multiple inputs.

rdar://13402653
PR15866

llvm-svn: 180802
2013-04-30 20:43:52 +00:00
Akira Hatanaka
61f007d121 [mips] Clear isCommutable bit of instructions which are not commutable.
llvm-svn: 180801
2013-04-30 20:40:39 +00:00
Hal Finkel
2ac40ae0d3 LocalStackSlotAllocation improvements
First, taking advantage of the fact that the virtual base registers are allocated in order of the local frame offsets, remove the quadratic register-searching behavior. Because of the ordering, we only need to check the last virtual base register created.

Second, store the frame index in the FrameRef structure, and get the frame index and the local offset from this structure at the top of the loop iteration. This allows us to de-nest the loops in insertFrameReferenceRegisters (and I think makes the code cleaner). I also moved the needsFrameBaseReg check into the first loop over instructions so that we don't bother pushing FrameRefs for instructions that don't want a virtual base register anyway.

Lastly, and this is the only functionality change, avoid the creation of single-use virtual base registers. These are currently not useful because, in general, they end up replacing what would be one r+r instruction with an add and a r+i instruction. Committing this removes the XFAIL in CodeGen/PowerPC/2007-09-07-LoadStoreIdxForms.ll

Jim has okayed this off-list.

llvm-svn: 180799
2013-04-30 20:04:37 +00:00
Rafael Espindola
50d06e76ab Text files should not be marked executable.
Patch by Oliver Pinter.

llvm-svn: 180797
2013-04-30 19:06:15 +00:00
Manman Ren
0b37dd0efc TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

llvm-svn: 180796
2013-04-30 17:52:57 +00:00
Adrian Prantl
b391eaaca2 Spelling. Thanks, Eric.
llvm-svn: 180794
2013-04-30 17:33:32 +00:00
Adrian Prantl
001a9c20ce Set debug locations for branch instructions created during inlining, even
the inlined function has multiple returns.

rdar://problem/12415623

llvm-svn: 180793
2013-04-30 17:08:16 +00:00
Rafael Espindola
b2fd483e24 Change getSlotIndex to return unsigned.
The actual storage was already using unsigned, but the interface was using
uint64_t. This is wasteful on 32 bits and looks to be the root causes of
a miscompilation on Windows where a value was being sign extended to 64bits
to compare with the result of getSlotIndex.

Patch by Pasi Parviainen!

llvm-svn: 180791
2013-04-30 16:53:38 +00:00
Rafael Espindola
58fcd9bdde Fix Addend computation for non external relocations on Macho.
llvm-svn: 180790
2013-04-30 15:40:54 +00:00
Vincent Lejeune
25352bd54f R600: fix loop-address.ll test
Texture cache is now used when shader type is not specified

llvm-svn: 180785
2013-04-30 12:47:56 +00:00
David Majnemer
5f05aaa765 Fix a bug in foldSelectICmpAndOr.
Differences in bitwidth between X and Y could exist even if C1 and C2 have
the same Log2 representation.

llvm-svn: 180779
2013-04-30 10:36:33 +00:00
Mihai Popa
e489a3a040 s tightens up the encoding description for ARM post-indexed ldr instructions. All instructions in this class have bit 4 cleared. It turns out that there is a test case for this, but it was marked XFAIL.
llvm-svn: 180778
2013-04-30 09:00:12 +00:00
David Majnemer
4b346f9a6e Fix "Combine bit test + conditional or into simple math"
This fixes the optimization introduced in r179748 and reverted in r179750.

While the optimization was sound, it did not properly respect differences in
bit-width.

llvm-svn: 180777
2013-04-30 08:57:58 +00:00
Michael Liao
c67e0fc9ea Rewrite X86 codegen regression test with FileCheck
llvm-svn: 180776
2013-04-30 07:51:08 +00:00
Stepan Dyatkovskiy
fd08e5fdd4 Refactoring patch.
1. VarArgStyleRegisters: functionality that emits "store" instructions for byval regs moved out into separated method "StoreByValRegs". Before this patch VarArgStyleRegisters had confused use-cases. It was used for both variadic functions and for regular functions with byval parameters. In last case it created new stack-frame and registered it as VarArg frame, that is wrong.

This patch replaces VarArgsStyleRegisters usage for byval parameters with StoreByValRegs method.

2. In ARMMachineFunctionInfo, "get/setVarArgsRegSaveSize" was renamed to "get/setArgRegsSaveSize". By the same reason. Sometimes it was used for variadic functions, and sometimes for byval parameters in regular functions. Actually, this property means the size of registers, that keeps arguments, and thats why it was renamed.

3. In ARMISelLowering.cpp, ARMTargetLowering class, in methods computeRegArea and StoreByValRegs, VARegXXXXXX was renamed to ArgRegsXXXXXX still by the same reasons.

llvm-svn: 180774
2013-04-30 07:19:58 +00:00
Reid Kleckner
1d971b9998 Try to fix ProgramTest on FreeBSD
This seemed like the cleanest way to find the test executable.  Also fix
the file mode.

llvm-svn: 180770
2013-04-30 04:30:41 +00:00
Rafael Espindola
c3bc22082f Collect the Addend for external relocs.
This fixes 2013-04-04-RelocAddend.ll. We don't have a testcase for non external
relocs with an Addend. I will try to write one.

llvm-svn: 180767
2013-04-30 01:29:57 +00:00
Vincent Lejeune
8054d1e2f8 R600: Always use texture cache for compute shaders
This will improve the performance of memory reads.

llvm-svn: 180762
2013-04-30 00:14:44 +00:00
Vincent Lejeune
29f24e0ce8 R600: use native for alu
llvm-svn: 180761
2013-04-30 00:14:38 +00:00
Vincent Lejeune
c6ba980992 R600: Packetize instructions
llvm-svn: 180760
2013-04-30 00:14:27 +00:00
Vincent Lejeune
176c8200bc R600: Rework Scheduling to handle difference between VLIW4 and VLIW5 chips
llvm-svn: 180759
2013-04-30 00:14:17 +00:00
Vincent Lejeune
7878fed9de R600: Add a Bank Swizzle operand
llvm-svn: 180758
2013-04-30 00:14:08 +00:00
Vincent Lejeune
b2f40c2a8c R600: Take inner dependency into tex/vtx clauses
llvm-svn: 180757
2013-04-30 00:14:00 +00:00
Vincent Lejeune
4d300cefe8 R600: Turn TEX/VTX into native instructions
llvm-svn: 180756
2013-04-30 00:13:53 +00:00
Vincent Lejeune
e641cd06c9 R600: Add FetchInst bit to instruction defs to denote vertex/tex instructions
v2[Vincent Lejeune]: Split FetchInst into usesTextureCache/usesVertexCache

llvm-svn: 180755
2013-04-30 00:13:39 +00:00
Michael Liao
3db1a24464 Rewrite test in FileCheck instead of grep in X86 codegen
llvm-svn: 180754
2013-04-30 00:13:38 +00:00
Vincent Lejeune
1b276d48e1 R600: Add some new processor variants
llvm-svn: 180753
2013-04-30 00:13:27 +00:00
Vincent Lejeune
fabf120f32 R600: Clean up instruction class definitions
llvm-svn: 180752
2013-04-30 00:13:20 +00:00
Vincent Lejeune
f8d86cf88b R600: config section now reports use of killgt
llvm-svn: 180751
2013-04-30 00:13:13 +00:00
Bill Wendling
4bc92c258f Revert the command line option patch. However, keep the part that makes this pass on Windows. I.e., we don't emit the target dependent attributes in a comment before the function.
llvm-svn: 180750
2013-04-29 23:48:06 +00:00
Manman Ren
180923f053 TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

llvm-svn: 180745
2013-04-29 22:58:55 +00:00
Bill Wendling
e24a89874b Duplicate a testcase.
llvm-svn: 180744
2013-04-29 22:42:47 +00:00
Manman Ren
13b2364d24 TBAA: remove !tbaa from testing cases if not used.
This will make it easier to turn on struct-path aware TBAA since the metadata
format will change.

llvm-svn: 180743
2013-04-29 22:42:01 +00:00
Michael Liao
4e03c7690d Rewrite some tests with FileCHeck in X86 codegen
- Revise previous patches of the same purpose by fixing
  *) grep <PA> | not grep <PB> semantically is not the same as
     CHECK: <PA>{{^<PB>.*$}} as the former will check all occurrences of <PA>
     while the later only check the first match. As the result, CHECK needs
     putting in all place where <PA> occurs.
  *) grep <PA> | count <N> needs a final CHECK-NOT of the same pattern.
     (As 'CHECK-<N>' is proposed for discussion, converting 'grep | count <N>'
      where N > 1 is postponed.)

llvm-svn: 180742
2013-04-29 22:41:29 +00:00
Adrian Prantl
d599fd59f3 Improve documentation.
llvm-svn: 180738
2013-04-29 22:25:52 +00:00
Bill Wendling
7a4381d8d9 Emit the TLS initialization function pointers into the correct section.
The `llvm.tls_init_funcs' (created by the front-end) holds pointers to the TLS
initialization functions. These need to be placed into the correct section so
that they are run before `main()'.

<rdar://problem/13733006>

llvm-svn: 180737
2013-04-29 22:25:40 +00:00
Rafael Espindola
d175d83203 Add getSymbolAlignment to the ObjectFile interface.
For regular object files this is only meaningful for common symbols. An object
file format with direct support for atoms should be able to provide alignment
information for all symbols.

This replaces getCommonSymbolAlignment and fixes
test-common-symbols-alignment.ll on darwin. This also includes a fix to
MachOObjectFile::getSymbolFlags. It was marking undefined symbols as common
(already tested by existing mcjit tests now that it is used).

llvm-svn: 180736
2013-04-29 22:24:22 +00:00
Tom Stellard
33e7a52e1c R600: Use correct CF_END instruction on Northern Island GPUs
llvm-svn: 180735
2013-04-29 22:23:58 +00:00
Tom Stellard
a22d2b47f3 R600: Fix encoding of CF_END_{EG, R600} instructions
The EOP bit was not being encoded.

llvm-svn: 180734
2013-04-29 22:23:54 +00:00
Rafael Espindola
7d9df9376a Rationalize what is public in RuntimeDyldMachO and RuntimeDyldELF.
The implemented RuntimeDyldImpl interface is public. Everything else is private.
Since these classes are not inherited from (yet), there is no need to have
protected members.

llvm-svn: 180733
2013-04-29 22:06:33 +00:00
Arnold Schwaighofer
d0c38e0586 SimplifyCFG: If convert single conditional stores
This resurrects r179957, but adds code that makes sure we don't touch
atomic/volatile stores:

This transformation will transform a conditional store with a preceeding
uncondtional store to the same location:

 a[i] =
 may-alias with a[i] load
 if (cond)
   a[i] = Y

into an unconditional store.

 a[i] = X
 may-alias with a[i] load
 tmp = cond ? Y : X;
 a[i] = tmp

We assume that on average the cost of a mispredicted branch is going to be
higher than the cost of a second store to the same location, and that the
secondary benefits of creating a bigger basic block for other optimizations to
work on outway the potential case where the branch would be correctly predicted
and the cost of the executing the second store would be noticably reflected in
performance.

hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With
this change we are on par with gcc's performance (gcc also performs this
transformation). There was a 1.2 % performance improvement on a ARM swift chip.
Other tests in the test-suite+external seem to be mostly uninfluenced in my
experiments:
This optimization was triggered on 41 tests such that the executable was
different before/after the patch. Only 1 out of the 40 tests (dealII) was
reproducable below 100% (by about .4%). Given that hmmer benefits so much I
believe this to be a fair trade off.

llvm-svn: 180731
2013-04-29 21:28:24 +00:00
Rafael Espindola
5189efa685 Disable the MCJIT tests on 32 bit darwin.
I recently enabled them on 32 and 64 bit darwin, but it looks like 32 bit is
still fairly broken.

llvm-svn: 180730
2013-04-29 21:09:32 +00:00
Rafael Espindola
1d9ec9b43d Remove unused method.
llvm-svn: 180729
2013-04-29 20:00:27 +00:00
Rafael Espindola
3a846aeccf Update the documentation.
llvm-svn: 180725
2013-04-29 19:33:51 +00:00
Rafael Espindola
7b7ac69f21 Use a RelocationRef instead of a relocation_iterator.
No functionality change.

llvm-svn: 180723
2013-04-29 19:03:21 +00:00
Reid Kleckner
3bf655a0d0 Revert "revert r179735, it has no testcases, and doesn't really make sense."
This un-reverts r179735 and reverts commit r180574.

This fixes assertion failures for me locally and should fix the failures
on Windows reported widely on llvm-dev.  We should check if the bots
caught this and if so why not.

llvm-svn: 180722
2013-04-29 18:23:53 +00:00
Andrew Kaylor
36788b2f65 Exposing MCJIT through C API
Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used).

Patch by Fili Pizlo

llvm-svn: 180720
2013-04-29 17:49:40 +00:00
Rafael Espindola
eda9da47d6 Propagate relocation info to resolveRelocation.
This gets most of the MCJITs tests passing with MachO.

llvm-svn: 180716
2013-04-29 17:24:34 +00:00