Commit Graph

22697 Commits

Author SHA1 Message Date
Evan Cheng
9b6d7b9fb3 Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49783 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 09:41:59 +00:00
Owen Anderson
1f23e16319 Major repairs to the post-dominators implementation. Patch from Florian Brandner!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:21:16 +00:00
Dan Gohman
171c11ec93 Add support for the form of the SSE41 extractps instruction that
puts its result in a 32-bit GPR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49762 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 02:32:24 +00:00
Dan Gohman
bcda285fcc Recreate the size SDNode instead of reusing the old one in the x86
memcpy lowering code; this ensures that the size node has the desired
result type. This fixes a regression from r49572 with @llvm.memcpy.i64
on x86-32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49761 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 01:32:32 +00:00
Evan Cheng
d94950c473 Avoid read after free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49760 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 01:22:28 +00:00
Dan Gohman
302cd54299 Remove X86_64SRet; it isn't used anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49759 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 00:24:30 +00:00
Dan Gohman
a630f4ed91 Add movd instructions to move from MMX registers
to 64-bit GPR registers on x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49757 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 23:55:07 +00:00
Dan Gohman
5a2d335c4c Fix the new scheduler assertion checks to work when
the scheduler has inserted no-ops. This fixes
the 2006-07-03-schedulers.ll regression on ppc32.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49747 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 22:40:14 +00:00
Chuck Rose III
cc51c31953 VisualStudio project files updated. #include <algorithm> added to make VisualStudio happy. Also had to undefine setjmp because of #include <csetjmp> turning setjmp into _setjmp in VisualStudio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49743 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 21:27:11 +00:00
Dale Johannesen
21d31a8d94 Don't assume a tail call can't reference a byval
argument to the outer function, this isn't correct.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49731 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 17:41:34 +00:00
Dan Gohman
b11af0db2e Use gv's --spartan option, which trades away an extra row of UI buttons
for more space for displaying the graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49730 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 17:27:05 +00:00
Nicolas Geoffray
6ccbbd8990 Change Divided flag to Split, as suggested by Evan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 08:08:50 +00:00
Dan Gohman
80792f3dde Treat EntryToken nodes as "passive" so that they aren't added to the
ScheduleDAG; they don't correspond to any actual instructions so they
don't need to be scheduled.

This fixes a bug where the EntryToken was being scheduled multiple
times in some cases, though it ended up not causing any trouble because 
EntryToken doesn't expand into anything. With this fixed the schedulers
reliably schedule the expected number of units, so we can check this
with an assertion.

This requires a tweak to test/CodeGen/X86/loop-hoist.ll because it
ends up getting scheduled differently in a trivial way, though it was
enough to fool the prcontext+grep that the test does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49701 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 01:22:18 +00:00
Dan Gohman
89bf0a6b05 In -view-sunit-dags, display "special" chain dependencies as cyan
instead of blue to distinguish them from regular dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49696 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 23:15:07 +00:00
Dan Gohman
0a9371de6d Remove unnecessary <sstream> includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49681 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 20:40:47 +00:00
Dan Gohman
b91c89dfb9 Avoid creating MERGE_VALUES nodes for single values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49676 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 18:43:25 +00:00
Dan Gohman
235fc57ef2 Teach AliasSetTracker about VAArgInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49674 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 18:34:50 +00:00
Dan Gohman
4a9a3e5374 Minor whitespace and comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49671 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 18:26:16 +00:00
Dan Gohman
f7b37b2d0e In the special case, call the comparison function instead of
manually performing the comparison. This allows the special
case to work correctly even in the case where someone is
experimenting with a different comparison function :-).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49670 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 18:23:56 +00:00
Dan Gohman
29e4bdbf27 Fix const-correctness issues with the SrcValue handling in the
memory intrinsic expansion code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49666 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:55:48 +00:00
Dale Johannesen
3541af73b6 Reverse sense of unwind-tables option. This means
stack tracebacks on Darwin x86-64 won't work by default;
nevertheless, everybody but me thinks this is a good idea.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:54:17 +00:00
Owen Anderson
6bc41e8a74 Revert r49614. As Dan pointed out, some of these aren't correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:38:21 +00:00
Nicolas Geoffray
9701c8a18f Fix /test/CodeGen/PowerPC/big-endian-actual-args.ll for linux/ppc32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49652 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:17:14 +00:00
Dan Gohman
d660f973dc VAArg may trap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49646 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 15:07:08 +00:00
Duncan Sands
ddc016cc85 Initial libcall support for LegalizeTypes. This is
much simpler than in LegalizeDAG because calls are
not yet expanded into call sequences: that happens
after type legalization has finished.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49634 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 06:48:48 +00:00
Chris Lattner
75caee2419 add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 19:41:25 +00:00
Owen Anderson
386ea355e7 Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 19:15:17 +00:00
Duncan Sands
4a6da60787 LegalizeTypes can sometimes have deleted nodes
in its maps.  Add some sanity checks that catch
this kind of thing.  Hopefully these can be
removed one day (once all problems are fixed!)
but for the moment it seems wise to have them in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49612 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 16:04:03 +00:00
Nicolas Geoffray
c0cb28fd3a Add a divided flag for the first piece of an argument divided into mulitple parts. Fixes PR1643
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49611 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 13:40:22 +00:00
Chris Lattner
3b37448904 Fix some serious logic errors that broke the jit on darwin/x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49606 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 07:04:56 +00:00
Duncan Sands
89f6d88db3 Merge LLVMBuilder and FoldingBuilder, calling
the result IRBuilder.  Patch by Dominic Hamon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 06:22:09 +00:00
Chris Lattner
86941611c9 Gabor points out that reserveOperandSpace takes # of values,
not # of operands as an input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49599 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 00:14:42 +00:00
Anton Korobeynikov
78c80fdbdd Provide option for stack alignment override
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49593 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 22:12:22 +00:00
Arnold Schwaighofer
4b5324ad2c This patch corrects the handling of byval arguments for tailcall
optimized x86-64 (and x86) calls so that they work (... at least for
my test cases).

Should fix the following problems:

Problem 1: When i introduced the optimized handling of arguments for
tail called functions (using a sequence of copyto/copyfrom virtual
registers instead of always lowering to top of the stack) i did not
handle byval arguments correctly e.g they did not work at all :).

Problem 2: On x86-64 after the arguments of the tail called function
are moved to their registers (which include ESI/RSI etc), tail call
optimization performs byval lowering which causes xSI,xDI, xCX
registers to be overwritten. This is handled in this patch by moving
the arguments to virtual registers first and after the byval lowering
the arguments are moved from those virtual registers back to
RSI/RDI/RCX.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49584 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 18:11:06 +00:00
Duncan Sands
460a14e09c Factor some libcall code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49583 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 17:14:18 +00:00
Dan Gohman
707e018423 Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal
on any current target and aren't optimized in DAGCombiner. Instead
of using intermediate nodes, expand the operations, choosing between
simple loads/stores, target-specific code, and library calls,
immediately.

Previously, the code to emit optimized code for these operations
was only used at initial SelectionDAG construction time; now it is
used at all times. This fixes some cases where rep;movs was being
used for small copies where simple loads/stores would be better.

This also cleans up code that checks for alignments less than 4;
let the targets make that decision instead of doing it in
target-independent code. This allows x86 to use rep;movs in
low-alignment cases.

Also, this fixes a bug that resulted in the use of rep;stos for
memsets of 0 with non-constant memory size when the alignment was
at least 4. It's better to use the library in this case, which
can be significantly faster when the size is large.

This also preserves more SourceValue information when memory
intrinsics are lowered into simple loads/stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49572 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 04:36:06 +00:00
Dan Gohman
6f836adafe Fix a bug that prevented x86-64 from using rep.movsq for
8-byte-aligned data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49571 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 02:35:39 +00:00
Nate Begeman
6795ebb663 80 col fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49569 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 00:47:57 +00:00
Nate Begeman
e956398cf1 Restore code to disable crash catcher on older OS X systems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49568 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 00:47:46 +00:00
Evan Cheng
97b8c40d09 Add debugging code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49566 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-12 00:22:01 +00:00
Chris Lattner
6098e4be94 Reenable JIT symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49548 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 18:11:56 +00:00
Evan Cheng
f2b24ca2c7 Do not add empty live intervals to handled_. They should never be undone for backtracking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49544 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 17:55:47 +00:00
Evan Cheng
f870fbc554 If a PHI node has a single implicit_def source, replace it with an implicit_def instead of a copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49543 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 17:54:45 +00:00
Evan Cheng
4cce6b4c78 Use of implicit_def is not part of live interval. Create empty intervals for the uses when the live interval is being spilled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 17:53:36 +00:00
Gabor Greif
78256a199e detabify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 09:34:57 +00:00
Owen Anderson
8f46c78fcc Fix PR2213 by simultaneously making GVN more aggressive with the return values
of calls and less aggressive with non-readnone calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49516 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 05:11:49 +00:00
Evan Cheng
d2012d0c4b Remove implicit_def instructions that become dead as result of coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 23:48:35 +00:00
Evan Cheng
5d3600f576 Allow registers defined by implicit_def to be clobbered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49512 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 23:47:53 +00:00
Dan Gohman
c04575f494 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49504 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 23:02:38 +00:00
Owen Anderson
f062f10231 Fix for PR2190. Memdep's non-local caching was checking dirtied blocks in the
wrong order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49499 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-10 22:13:32 +00:00