Commit Graph

45365 Commits

Author SHA1 Message Date
Dale Johannesen
990afedb3a Fix one more place where debug info affected
codegen (speculative execution).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 01:05:24 +00:00
Chris Lattner
ee167a729e just initialize the first element, we don't need to set the rest to zeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66850 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 00:24:01 +00:00
Chris Lattner
807926a945 Eliminate a 9640 byte static mutable initialized data item by moving it
to the stack.  This shrinks all llvm tools by 9k, and improves reentrancy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 00:03:51 +00:00
Chris Lattner
e213f3f972 static functions don't need an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 23:59:55 +00:00
Dan Gohman
b398fca15b Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 23:55:10 +00:00
Dale Johannesen
8483e54837 Previous debug info fix to this code wasn't quite
right; did the wrong thing when there are exactly 11
non-debug instructions, followed by debug info.
Remove a FIXME since it's apparently been fixed along the way.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66840 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 23:18:09 +00:00
Gabor Greif
7e07c00120 cosmetic change, in preparation of future change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66839 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 23:13:03 +00:00
Evan Cheng
379e15e988 Add this test back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 23:01:35 +00:00
Daniel Dunbar
bcf8ea9554 raw_ostream: unbuffered streams weren't being immediately flushed on
single character writes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66827 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 22:02:44 +00:00
Duncan Sands
58256f83c8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 21:13:42 +00:00
Scott Michel
87af5f0296 Darwin 10.4.x: "-rpath" is unnecessary when linking shared libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 21:03:53 +00:00
Dale Johannesen
c81f5445a7 There already was a class to force deterministic
sorting of ConstantInt's; unreinvent wheel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66824 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 21:01:11 +00:00
Bob Wilson
85cdfad07f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 19:47:24 +00:00
Gabor Greif
ae5a20a917 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66815 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 18:34:49 +00:00
Evan Cheng
a065200eaf Re-apply 66024 with fixes: 1. Fixed indirect call to immediate address assembly. 2. Fixed JIT encoding by making the address pc-relative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66803 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 18:15:39 +00:00
Dale Johannesen
80b8a62fda Another missing check for debug intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66800 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 17:42:45 +00:00
Chris Lattner
40a07a4121 Fully initialize all ivars, fixing PR3790, patch by Edwin Torok!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66798 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 17:22:48 +00:00
Evan Cheng
826af20ed5 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66797 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 17:07:39 +00:00
Evan Cheng
0b220d0e6c Fix test after Chris' select changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66795 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 16:10:08 +00:00
Duncan Sands
1aeac022f5 Adjust this test for recent sroa improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 11:56:12 +00:00
Gabor Greif
6a65f4208f add some text to explain sentinels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66790 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 10:30:31 +00:00
Gabor Greif
0cbcabedc5 minor tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66788 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 09:47:03 +00:00
Owen Anderson
0ff4e2105b Reorganize some #include's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 06:58:19 +00:00
Chris Lattner
d1980a5acd 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 06:52:53 +00:00
Chris Lattner
2b9f434908 improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66778 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 06:46:02 +00:00
Evan Cheng
8042255118 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66777 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 06:29:49 +00:00
Evan Cheng
536e66764b On x86, if the only use of a i64 load is a i64 store, generate a pair of double load and store instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 05:59:15 +00:00
Chris Lattner
1285295e61 add no-unwind, remove duplicate run line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66775 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 05:56:37 +00:00
Chris Lattner
7a15c8fe22 add nounwinds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 05:35:33 +00:00
Bill Wendling
a0833356fe Revert r66765 and r66766. These were causing build failures on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66770 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 04:10:09 +00:00
Nick Lewycky
fb13881d4a Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66766 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 03:34:33 +00:00
Nick Lewycky
8bc080358f Set ARCH to x86 on mixed 32/64-bit Linux systems.
Remove the explicit if OS = Darwin test around the setting of -m32/-m64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 03:34:19 +00:00
Sanjiv Gupta
054401b9f2 Forgot to check-in this as part of 7761.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 03:20:07 +00:00
Sanjiv Gupta
d076570a66 Banksel optimization is now based on the section names of symbols, since the symbols in one section will always be put into one bank.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 02:10:45 +00:00
Dale Johannesen
1379cadf8d Allow for switch values bigger than 64 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66751 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 01:20:06 +00:00
Daniel Dunbar
e889d837a4 Add StringMap::lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 01:16:06 +00:00
Dale Johannesen
a9537cf3fc 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66749 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 01:00:26 +00:00
Evan Cheng
fd82995823 Also pass -gcc-tool-args when building a shared object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 00:53:34 +00:00
Dan Gohman
30143763b9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 23:01:47 +00:00
Gabor Greif
c40d4f85dd update
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 22:52:25 +00:00
Rafael Espindola
b316f90e57 optimize i8 and i16 tls values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66725 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 22:40:04 +00:00
Owen Anderson
1ed5b714f1 Reorganization: Move the Spiller out of VirtRegMap.cpp into its own files. No (intended) functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66720 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 22:31:21 +00:00
Bill Wendling
f9abd7e33e Add a -no-implicit-float flag. This acts like -soft-float, but may generate
floating point instructions that are explicitly specified by the user.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 22:30:01 +00:00
Dale Johannesen
a891518c4d 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66716 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 22:19:43 +00:00
Evan Cheng
a597a97618 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66715 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 22:18:44 +00:00
Dale Johannesen
497cb6fd4c Debug intriniscs should be skipped when looking
for a dependency, not terminate the search.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66709 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 21:13:01 +00:00
Anton Korobeynikov
773f57e66e Another bug :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 21:05:21 +00:00
Torok Edwin
1d9887054a Make Print callable from a pass's print method: add const qualifier. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 20:50:17 +00:00
Anton Korobeynikov
26d6e21c53 I should definitely read make docs someday :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 20:40:15 +00:00
Gabor Greif
c540b1fd01 do not pretend llvm/.../*.h being system headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66697 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 20:23:40 +00:00