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

45357 Commits

Author SHA1 Message Date
Duncan Sands
968939fca2 Revert commit 66140 since it caused several failures
in the Ada testcase.  Reverting this only covers up
the real problem, which is a nasty conceptual difficulty
in the phi elimination pass: when eliminating phi nodes
in landing pads, the register copies need to come before
the invoke, not at the end of the basic block which is
too late...  See PR3784.

llvm-svn: 66826
2009-03-12 21:13:42 +00:00
Scott Michel
addb2cdbea Darwin 10.4.x: "-rpath" is unnecessary when linking shared libraries.
llvm-svn: 66825
2009-03-12 21:03:53 +00:00
Dale Johannesen
d9b24eba60 There already was a class to force deterministic
sorting of ConstantInt's; unreinvent wheel.

llvm-svn: 66824
2009-03-12 21:01:11 +00:00
Bob Wilson
7c7573dc3f Fix an inconsistent use of LLVMGCCDIR. In all other cases, this directory
refers to the "prefix" directory, i.e., one level above "bin".  LLVMGCCPATH
is used as the directory containing the llvm-gcc executable, so add a "/bin"
suffix to get from LLVMGCCDIR to LLVMGCCPATH.

llvm-svn: 66823
2009-03-12 19:47:24 +00:00
Gabor Greif
037f4dc1a4 Rearrange operands of the BranchInst, to be able to
access each with a fixed negative index from op_end().

This has two important implications:
- getUser() will work faster, because there are less iterations
  for the waymarking algorithm to perform. This is important
  when running various analyses that want to determine callers
  of basic blocks.
- getSuccessor() now runs faster, because the indirection via OperandList
  is not necessary: Uses corresponding to the successors are at fixed
  offset to "this".

The price we pay is the slightly more complicated logic in the operator
User::delete, as it has to pick up the information whether it has to free
the memory of an original unconditional BranchInst or a BranchInst that
was originally conditional, but has been shortened to unconditional.
I was not able to come up with a nicer solution to this problem. (And
rest assured, I tried *a lot*).

Similar reorderings will follow for InvokeInst and CallInst. After that
some optimizations to pred_iterator and CallSite will fall out naturally.

llvm-svn: 66815
2009-03-12 18:34:49 +00:00
Evan Cheng
d112c41d95 Re-apply 66024 with fixes: 1. Fixed indirect call to immediate address assembly. 2. Fixed JIT encoding by making the address pc-relative.
llvm-svn: 66803
2009-03-12 18:15:39 +00:00
Dale Johannesen
78eadcb3dc Another missing check for debug intrinsics.
llvm-svn: 66800
2009-03-12 17:42:45 +00:00
Chris Lattner
9fe6460516 Fully initialize all ivars, fixing PR3790, patch by Edwin Torok!
llvm-svn: 66798
2009-03-12 17:22:48 +00:00
Evan Cheng
e04a84ed9f Typo.
llvm-svn: 66797
2009-03-12 17:07:39 +00:00
Evan Cheng
45aa89fa9a Fix test after Chris' select changes.
llvm-svn: 66795
2009-03-12 16:10:08 +00:00
Duncan Sands
38860e65b3 Adjust this test for recent sroa improvements.
llvm-svn: 66791
2009-03-12 11:56:12 +00:00
Gabor Greif
0cf8da6c06 add some text to explain sentinels
llvm-svn: 66790
2009-03-12 10:30:31 +00:00
Gabor Greif
51ea08b090 minor tweaks
llvm-svn: 66788
2009-03-12 09:47:03 +00:00
Owen Anderson
4060191b0e Reorganize some #include's.
llvm-svn: 66780
2009-03-12 06:58:19 +00:00
Chris Lattner
26a971c4ec Move 3 "(add (select cc, 0, c), x) -> (select cc, x, (add, x, c))"
related transformations out of target-specific dag combine into the
ARM backend.  These were added by Evan in r37685 with no testcases
and only seems to help ARM (e.g. test/CodeGen/ARM/select_xform.ll).

Add some simple X86-specific (for now) DAG combines that turn things
like cond ? 8 : 0  -> (zext(cond) << 3).  This happens frequently
with the recently added cp constant select optimization, but is a
very general xform.  For example, we now compile the second example
in const-select.ll to:

_test:
        movsd   LCPI2_0, %xmm0
        ucomisd 8(%esp), %xmm0
        seta    %al
        movzbl  %al, %eax
        movl    4(%esp), %ecx
        movsbl  (%ecx,%eax,4), %eax
        ret

instead of:

_test:
        movl    4(%esp), %eax
        leal    4(%eax), %ecx
        movsd   LCPI2_0, %xmm0
        ucomisd 8(%esp), %xmm0
        cmovbe  %eax, %ecx
        movsbl  (%ecx), %eax
        ret

This passes multisource and dejagnu.

llvm-svn: 66779
2009-03-12 06:52:53 +00:00
Chris Lattner
b904fac1b8 improve comment.
llvm-svn: 66778
2009-03-12 06:46:02 +00:00
Evan Cheng
47778669f5 Enable Chris' value propagation change. It make available known sign, zero, one bits information for values that are live out of basic blocks. The goal is to eliminate unnecessary sext, zext, truncate of values that are live-in to blocks. This does not handle PHI nodes yet.
llvm-svn: 66777
2009-03-12 06:29:49 +00:00
Evan Cheng
46e903d2f6 On x86, if the only use of a i64 load is a i64 store, generate a pair of double load and store instead.
llvm-svn: 66776
2009-03-12 05:59:15 +00:00
Chris Lattner
a5368fd283 add no-unwind, remove duplicate run line.
llvm-svn: 66775
2009-03-12 05:56:37 +00:00
Chris Lattner
cb52d81eea add nounwinds
llvm-svn: 66773
2009-03-12 05:35:33 +00:00
Bill Wendling
69b05ddc4f Revert r66765 and r66766. These were causing build failures on Darwin.
llvm-svn: 66770
2009-03-12 04:10:09 +00:00
Nick Lewycky
29e01c5af5 Regenerate.
llvm-svn: 66766
2009-03-12 03:34:33 +00:00
Nick Lewycky
71fd935173 Set ARCH to x86 on mixed 32/64-bit Linux systems.
Remove the explicit if OS = Darwin test around the setting of -m32/-m64.

llvm-svn: 66765
2009-03-12 03:34:19 +00:00
Sanjiv Gupta
09e6929cc5 Forgot to check-in this as part of 7761.
llvm-svn: 66763
2009-03-12 03:20:07 +00:00
Sanjiv Gupta
85826620f1 Banksel optimization is now based on the section names of symbols, since the symbols in one section will always be put into one bank.
llvm-svn: 66761
2009-03-12 02:10:45 +00:00
Dale Johannesen
6a856e8183 Allow for switch values bigger than 64 bits.
llvm-svn: 66751
2009-03-12 01:20:06 +00:00
Daniel Dunbar
a3c65dba44 Add StringMap::lookup.
llvm-svn: 66750
2009-03-12 01:16:06 +00:00
Dale Johannesen
a63033a34c Fix some nondeterministic behavior when forwarding
from a switch table.  Multiple table entries that
branch to the same place were being sorted by the
pointer value of the ConstantInt*; changed to sort
by the actual value of the ConstantInt.

llvm-svn: 66749
2009-03-12 01:00:26 +00:00
Evan Cheng
e4f82d3dcc Also pass -gcc-tool-args when building a shared object.
llvm-svn: 66746
2009-03-12 00:53:34 +00:00
Dan Gohman
d30e108f0e Revert r66024. The JIT encoding for CALLpcrel32 is wrong -- see PR3773, and the
assembly text output uses an indirect call ("call *") instead of a direct call.

llvm-svn: 66735
2009-03-11 23:01:47 +00:00
Gabor Greif
04dfd9fef9 update
llvm-svn: 66733
2009-03-11 22:52:25 +00:00
Rafael Espindola
a8fe373200 optimize i8 and i16 tls values.
llvm-svn: 66725
2009-03-11 22:40:04 +00:00
Owen Anderson
fb5980b6ab Reorganization: Move the Spiller out of VirtRegMap.cpp into its own files. No (intended) functionality change.
llvm-svn: 66720
2009-03-11 22:31:21 +00:00
Bill Wendling
fca05e3a5c Add a -no-implicit-float flag. This acts like -soft-float, but may generate
floating point instructions that are explicitly specified by the user.

llvm-svn: 66719
2009-03-11 22:30:01 +00:00
Dale Johannesen
bc9067e872 Skip interleaved debug info when fast-forwarding through
allocations.  Apparently the assumption is there is an
instruction (terminator?) following the allocation so I
am allowing the same assumption.

llvm-svn: 66716
2009-03-11 22:19:43 +00:00
Evan Cheng
042e05cb31 My last coalescer fix introduced a subtler one. It's aborting a commuting optimization too late and left the live intervals to be out of sync with instructions. This fixes 8b10b.
llvm-svn: 66715
2009-03-11 22:18:44 +00:00
Dale Johannesen
e6adfccf09 Debug intriniscs should be skipped when looking
for a dependency, not terminate the search.

llvm-svn: 66709
2009-03-11 21:13:01 +00:00
Anton Korobeynikov
205b701b43 Another bug :(
llvm-svn: 66708
2009-03-11 21:05:21 +00:00
Torok Edwin
25781329c4 Make Print callable from a pass's print method: add const qualifier. No
functionality change.

llvm-svn: 66700
2009-03-11 20:50:17 +00:00
Anton Korobeynikov
60455b5097 I should definitely read make docs someday :(
llvm-svn: 66699
2009-03-11 20:40:15 +00:00
Gabor Greif
2c4672b310 do not pretend llvm/.../*.h being system headers
llvm-svn: 66697
2009-03-11 20:23:40 +00:00
Anton Korobeynikov
a4b01bf40c Unbreak the build. Dunno, why it did not fail on mingw :(
llvm-svn: 66692
2009-03-11 20:16:05 +00:00
Duncan Sands
b27c523449 It makes no sense to have a ODR version of common
linkage, so remove it.

llvm-svn: 66690
2009-03-11 20:14:15 +00:00
Gabor Greif
b31a9d0dc0 fix validator errors
llvm-svn: 66688
2009-03-11 20:04:08 +00:00
Gabor Greif
5805f37f74 Fix exaples using IRBuilder. Thanks, Quadrescence and Glip7 from IRC!
llvm-svn: 66687
2009-03-11 19:51:07 +00:00
Anton Korobeynikov
fe336ae73e Disable plugins / shared stuff generation on windows targets.
This fixes fallout from recent PIC/delibtoolize changes and unbreaks
build on cygming.

llvm-svn: 66686
2009-03-11 19:49:42 +00:00
Mon P Wang
287e422039 For yonah, fix a vector shuffle case for v16i8 where we didn't properly clear some bits.
llvm-svn: 66684
2009-03-11 18:47:57 +00:00
Chris Lattner
8fdb9ac396 implement support for C-style string literal concatenation in td files.
llvm-svn: 66663
2009-03-11 17:08:13 +00:00
Chris Lattner
5bf3e7dc27 fix PR3785, a valgrind error on test/CodeGen/ARM/pr3502.ll
llvm-svn: 66660
2009-03-11 16:14:25 +00:00
Duncan Sands
87527ab284 Add parentheses to pacify gcc-4.3.
llvm-svn: 66653
2009-03-11 09:04:34 +00:00