Chris Lattner
c8c74f39db
Add a new Jump Threading pass, which will handle cases
...
such as those in PR2235. Right now the pass is not very
effective. :)
llvm-svn: 50000
2008-04-20 20:35:01 +00:00
Chris Lattner
75df16a5b0
hopefully resolve PR2240
...
llvm-svn: 49999
2008-04-20 19:59:12 +00:00
Chris Lattner
2bed045e5e
rearrange some code, simplify handling of shifts.
...
llvm-svn: 49995
2008-04-20 18:24:14 +00:00
Dale Johannesen
15969b664d
Check we aren't trying to convert PPC long double.
...
This fixes the testsuite failure on ppcf128-4.ll.
llvm-svn: 49994
2008-04-20 18:23:46 +00:00
Nicolas Geoffray
c80229e1c7
Cosmetic changes, as suggested by Evan. No functionality changes.
...
llvm-svn: 49993
2008-04-20 17:44:19 +00:00
Dale Johannesen
3453a89a31
(re)fix handling of UGT. Pointed out by Nick Lewycky.
...
llvm-svn: 49991
2008-04-20 16:58:57 +00:00
Torok Edwin
e038c595c1
g++-4.3 build-fix: CHAR_BIT requires <climits>.
...
llvm-svn: 49989
2008-04-20 08:33:11 +00:00
Nicolas Geoffray
5fdce98ebd
Do not hold the JIT lock when materializing a function and verify if the
...
function has already been codegen'd. This is required by the Java class loading
mechanism which executes Java code when materializing a function.
llvm-svn: 49988
2008-04-20 08:33:02 +00:00
Chris Lattner
2c5b96fbee
A better fix for my previous patch, MOVZQI2PQIrr just requires SSE2.
...
llvm-svn: 49986
2008-04-20 05:52:46 +00:00
Dale Johannesen
675fca3ee1
Check that APFloat::convert is not trying to target
...
ppc long double, which doesn't work.
This may break some stuff temporarily, but I want to
avoid the propagation of code that assumes this works.
llvm-svn: 49983
2008-04-20 01:34:03 +00:00
Chris Lattner
33e206ef89
regenerate
...
llvm-svn: 49978
2008-04-20 00:41:19 +00:00
Chris Lattner
f390d62b7f
Switch to using Simplified ConstantFP::get API.
...
llvm-svn: 49977
2008-04-20 00:41:09 +00:00
Chris Lattner
0cda383725
Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
...
llvm-svn: 49976
2008-04-20 00:26:06 +00:00
Chris Lattner
8cde1e71f0
Implement PR2206.
...
llvm-svn: 49967
2008-04-19 22:17:26 +00:00
Chris Lattner
1303e72c66
refactor handling of symbolic constant folding, picking up
...
a few new cases( see Integer/a1.ll), but not anything that
would happen in practice.
llvm-svn: 49965
2008-04-19 21:58:19 +00:00
Chris Lattner
57bd4076b5
indentation fix.
...
llvm-svn: 49964
2008-04-19 21:13:00 +00:00
Chris Lattner
d299f7b8cf
Allow argpromote to promote struct arguments with a specified number
...
of elements. Patch by Matthijs Kooijman!
llvm-svn: 49962
2008-04-19 19:50:01 +00:00
Evan Cheng
f583b3feb6
64-bit atomic operations.
...
llvm-svn: 49949
2008-04-19 02:30:38 +00:00
Evan Cheng
1c54ebbe2f
Also LXCHG64 -> XCHG64rm.
...
llvm-svn: 49948
2008-04-19 02:05:42 +00:00
Evan Cheng
09e77f6b83
PPC32 atomic operations.
...
llvm-svn: 49947
2008-04-19 01:30:48 +00:00
Evan Cheng
b1d240f973
xchg which references a memory operand does not need to lock prefix. Atomicity is guaranteed.
...
llvm-svn: 49946
2008-04-19 01:20:30 +00:00
Dan Gohman
ac2fac937c
Teach llvm-as to accept function types with multiple return types.
...
llvm-svn: 49945
2008-04-19 00:24:39 +00:00
Dale Johannesen
c1b7e0b477
Fix a scalar evolution bug. Reversing everything
...
does not work because of 0; 2>0 but -2U is also >0.
llvm-svn: 49928
2008-04-18 21:38:31 +00:00
Nicolas Geoffray
f005e6fa3b
Enable jitting with a known memory size.
...
llvm-svn: 49924
2008-04-18 20:59:31 +00:00
Duncan Sands
26b54dda58
Implement a bit more softfloat support in
...
LegalizeTypes. Correct the load logic so
that it actually works, and also teach it
to handle floating point extending loads.
llvm-svn: 49923
2008-04-18 20:56:03 +00:00
Dan Gohman
98ca33cb59
Fix the handling of va_copy on x86-64. As of llvm-gcc r49920
...
llvm-gcc is now lowering va_copy on x86-64, so this completes
the fix for PR2230.
llvm-svn: 49922
2008-04-18 20:55:41 +00:00
Evan Cheng
a626e13995
- Fix atomic operation JIT encoding.
...
- Remove unused instructions.
llvm-svn: 49921
2008-04-18 20:55:36 +00:00
Duncan Sands
c21336d6b8
Add some more FIXME's for indexed loads and stores.
...
llvm-svn: 49916
2008-04-18 20:27:12 +00:00
Duncan Sands
88d2a8459b
Provide an explicit list of operands to MakeLibcall,
...
rather than having it suck them out of a node. Add
a bunch of new libcalls, and remove dead softfloat
code (dead, because FloatToInt is used not Expand
in this case). Note that indexed stores probably
aren't handled properly, likewise for loads.
llvm-svn: 49915
2008-04-18 20:25:14 +00:00
Evan Cheng
c215f9f091
Correct comment.
...
llvm-svn: 49913
2008-04-18 19:25:26 +00:00
Evan Cheng
b23895db40
Not safe to "kill" a register if its live range extends pass the end of block branch.
...
llvm-svn: 49911
2008-04-18 19:22:23 +00:00
Evan Cheng
2b03674feb
Also support Intel asm syntax.
...
llvm-svn: 49878
2008-04-17 23:35:10 +00:00
Dan Gohman
cfdb39da9c
Remove the implicit conversion from SDOperandPtr to SDOperand*; this
...
may fix a build error on Visual Studio.
llvm-svn: 49876
2008-04-17 23:02:12 +00:00
Evan Cheng
0b36ca5023
Fix assembly code for atomic operations.
...
llvm-svn: 49869
2008-04-17 21:26:35 +00:00
Evan Cheng
073659986f
Be more careful with insert_subreg and extract_subreg where either source or destination operand has already been coalesced with another register that's defined by a insert_subreg or extract_subreg.
...
llvm-svn: 49843
2008-04-17 07:58:04 +00:00
Owen Anderson
cd1b9c4b43
Make GVN able to remove unnecessary calls to read-only functions again.
...
llvm-svn: 49842
2008-04-17 05:36:50 +00:00
Bill Wendling
98aab12b63
Use correct name for method in comment.
...
llvm-svn: 49841
2008-04-17 05:20:39 +00:00
Dan Gohman
c4bea57bb4
Correct the SrcValue information in the Expand code for va_copy.
...
llvm-svn: 49839
2008-04-17 02:09:26 +00:00
Scott Michel
31b3639a2d
Remove unused variable
...
llvm-svn: 49838
2008-04-17 01:30:44 +00:00
Evan Cheng
7c2c3333ca
Fix a sub-register indice propagation bug.
...
llvm-svn: 49832
2008-04-17 00:06:42 +00:00
Scott Michel
4b37c88f48
Workaround for PR2207, in which pred_iterator assert gets triggered due to a
...
wee problem in Xcode 2.[45]/gcc 4.0.1.
llvm-svn: 49831
2008-04-16 23:46:39 +00:00
Evan Cheng
e2e899b5c2
Don't forget about sub-register indices when rematting instructions.
...
llvm-svn: 49830
2008-04-16 23:44:44 +00:00
Dale Johannesen
d19ab27ee1
Unbreak build on x86-64.
...
llvm-svn: 49822
2008-04-16 22:24:33 +00:00
Nicolas Geoffray
1f3211af01
Correlate stubs with functions in JIT: when emitting a stub, the JIT tells the memory manager which function
...
the stub will resolve.
llvm-svn: 49814
2008-04-16 20:46:05 +00:00
Evan Cheng
44a0a0c8ee
After reading memory that's already freed.
...
llvm-svn: 49810
2008-04-16 20:24:25 +00:00
Nicolas Geoffray
82baa2d2c6
Infrastructure for getting the machine code size of a function and an instruction. X86, PowerPC and ARM are implemented
...
llvm-svn: 49809
2008-04-16 20:10:13 +00:00
Evan Cheng
341bed7210
Initialize X863DNowLevel.
...
llvm-svn: 49808
2008-04-16 19:03:02 +00:00
Evan Cheng
543905c353
Fix PR2226. Avoid using uninitialized variables.
...
llvm-svn: 49807
2008-04-16 18:48:43 +00:00
Evan Cheng
79b92b5168
Empty basic block should have an empty range.
...
llvm-svn: 49800
2008-04-16 18:01:08 +00:00
Dale Johannesen
87b88d2a8f
Don't read off end of the input array.
...
llvm-svn: 49799
2008-04-16 17:31:41 +00:00
Roman Levenstein
728d59166f
Ongoing work on improving the instruction selection infrastructure:
...
Rename SDOperandImpl back to SDOperand.
Introduce the SDUse class that represents a use of the SDNode referred by
an SDOperand. Now it is more similar to Use/Value classes.
Patch is approved by Dan Gohman.
llvm-svn: 49795
2008-04-16 16:15:27 +00:00
Evan Cheng
6d05ce493b
Rewrite LiveVariable liveness computation. The new implementation is much simplified. It eliminated the nasty recursive routines and removed the partial def / use bookkeeping. There is also potential for performance improvement by replacing the conservative handling of partial physical register definitions. The code is currently disabled until live interval analysis is taught of the name scheme.
...
This patch also fixed a couple of nasty corner cases.
llvm-svn: 49784
2008-04-16 09:46:40 +00:00
Evan Cheng
b3c4319e64
Code clean up.
...
llvm-svn: 49783
2008-04-16 09:41:59 +00:00
Owen Anderson
030428b435
Major repairs to the post-dominators implementation. Patch from Florian Brandner!
...
llvm-svn: 49768
2008-04-16 04:21:16 +00:00
Dan Gohman
be8f2b452b
Add support for the form of the SSE41 extractps instruction that
...
puts its result in a 32-bit GPR.
llvm-svn: 49762
2008-04-16 02:32:24 +00:00
Dan Gohman
cf79877623
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.
llvm-svn: 49761
2008-04-16 01:32:32 +00:00
Evan Cheng
f99e30e9ee
Avoid read after free.
...
llvm-svn: 49760
2008-04-16 01:22:28 +00:00
Dan Gohman
6f9b55bc7c
Remove X86_64SRet; it isn't used anymore.
...
llvm-svn: 49759
2008-04-16 00:24:30 +00:00
Dan Gohman
7d27552962
Add movd instructions to move from MMX registers
...
to 64-bit GPR registers on x86-64.
llvm-svn: 49757
2008-04-15 23:55:07 +00:00
Dan Gohman
603247a4ff
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.
llvm-svn: 49747
2008-04-15 22:40:14 +00:00
Chuck Rose III
fbfb612c4e
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.
...
llvm-svn: 49743
2008-04-15 21:27:11 +00:00
Dale Johannesen
45e14f7753
Don't assume a tail call can't reference a byval
...
argument to the outer function, this isn't correct.
llvm-svn: 49731
2008-04-15 17:41:34 +00:00
Dan Gohman
d0162df4c1
Use gv's --spartan option, which trades away an extra row of UI buttons
...
for more space for displaying the graph.
llvm-svn: 49730
2008-04-15 17:27:05 +00:00
Nicolas Geoffray
7e0110f724
Change Divided flag to Split, as suggested by Evan
...
llvm-svn: 49715
2008-04-15 08:08:50 +00:00
Dan Gohman
3b99b3c807
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.
llvm-svn: 49701
2008-04-15 01:22:18 +00:00
Dan Gohman
dfa422fe9e
In -view-sunit-dags, display "special" chain dependencies as cyan
...
instead of blue to distinguish them from regular dependencies.
llvm-svn: 49696
2008-04-14 23:15:07 +00:00
Dan Gohman
77049e31b6
Remove unnecessary <sstream> includes.
...
llvm-svn: 49681
2008-04-14 20:40:47 +00:00
Dan Gohman
133e6489aa
Avoid creating MERGE_VALUES nodes for single values.
...
llvm-svn: 49676
2008-04-14 18:43:25 +00:00
Dan Gohman
14dce3e51c
Teach AliasSetTracker about VAArgInst.
...
llvm-svn: 49674
2008-04-14 18:34:50 +00:00
Dan Gohman
3e7d0f3882
Minor whitespace and comment cleanups.
...
llvm-svn: 49671
2008-04-14 18:26:16 +00:00
Dan Gohman
5c71910cf6
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 :-).
llvm-svn: 49670
2008-04-14 18:23:56 +00:00
Dan Gohman
8d46278998
Fix const-correctness issues with the SrcValue handling in the
...
memory intrinsic expansion code.
llvm-svn: 49666
2008-04-14 17:55:48 +00:00
Dale Johannesen
edcba1161f
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.
llvm-svn: 49663
2008-04-14 17:54:17 +00:00
Owen Anderson
8aaa632351
Revert r49614. As Dan pointed out, some of these aren't correct.
...
llvm-svn: 49657
2008-04-14 17:38:21 +00:00
Nicolas Geoffray
5d04329f4b
Fix /test/CodeGen/PowerPC/big-endian-actual-args.ll for linux/ppc32
...
llvm-svn: 49652
2008-04-14 17:17:14 +00:00
Dan Gohman
6c8b715be0
VAArg may trap.
...
llvm-svn: 49646
2008-04-14 15:07:08 +00:00
Duncan Sands
2b303812b9
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.
llvm-svn: 49634
2008-04-14 06:48:48 +00:00
Chris Lattner
f63bdaf0b5
add a new CallGraphNode::removeCallEdgeFor method, tidy some comments.
...
llvm-svn: 49617
2008-04-13 19:41:25 +00:00
Owen Anderson
b54defaff0
Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
...
which is significantly more efficient.
llvm-svn: 49614
2008-04-13 19:15:17 +00:00
Duncan Sands
651a9b7ed0
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.
llvm-svn: 49612
2008-04-13 16:04:03 +00:00
Nicolas Geoffray
ad5556e8ba
Add a divided flag for the first piece of an argument divided into mulitple parts. Fixes PR1643
...
llvm-svn: 49611
2008-04-13 13:40:22 +00:00
Chris Lattner
e7147e7478
Fix some serious logic errors that broke the jit on darwin/x86-64.
...
llvm-svn: 49606
2008-04-13 07:04:56 +00:00
Duncan Sands
c5f548f784
Merge LLVMBuilder and FoldingBuilder, calling
...
the result IRBuilder. Patch by Dominic Hamon.
llvm-svn: 49604
2008-04-13 06:22:09 +00:00
Chris Lattner
7f30f2f8a5
Gabor points out that reserveOperandSpace takes # of values,
...
not # of operands as an input.
llvm-svn: 49599
2008-04-13 00:14:42 +00:00
Anton Korobeynikov
ea8dbf596a
Provide option for stack alignment override
...
llvm-svn: 49593
2008-04-12 22:12:22 +00:00
Arnold Schwaighofer
82af0e6a43
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.
llvm-svn: 49584
2008-04-12 18:11:06 +00:00
Duncan Sands
d74b96a812
Factor some libcall code.
...
llvm-svn: 49583
2008-04-12 17:14:18 +00:00
Dan Gohman
15edbf989f
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.
llvm-svn: 49572
2008-04-12 04:36:06 +00:00
Dan Gohman
41f9d24d52
Fix a bug that prevented x86-64 from using rep.movsq for
...
8-byte-aligned data.
llvm-svn: 49571
2008-04-12 02:35:39 +00:00
Nate Begeman
81586b24d6
80 col fix
...
llvm-svn: 49569
2008-04-12 00:47:57 +00:00
Nate Begeman
17ad231324
Restore code to disable crash catcher on older OS X systems
...
llvm-svn: 49568
2008-04-12 00:47:46 +00:00
Evan Cheng
37eb9de565
Add debugging code.
...
llvm-svn: 49566
2008-04-12 00:22:01 +00:00
Chris Lattner
08453a5234
Reenable JIT symbol table.
...
llvm-svn: 49548
2008-04-11 18:11:56 +00:00
Evan Cheng
27262ddcf3
Do not add empty live intervals to handled_. They should never be undone for backtracking.
...
llvm-svn: 49544
2008-04-11 17:55:47 +00:00
Evan Cheng
6e52146f16
If a PHI node has a single implicit_def source, replace it with an implicit_def instead of a copy.
...
llvm-svn: 49543
2008-04-11 17:54:45 +00:00
Evan Cheng
b389b78462
Use of implicit_def is not part of live interval. Create empty intervals for the uses when the live interval is being spilled.
...
llvm-svn: 49542
2008-04-11 17:53:36 +00:00
Gabor Greif
f6552899f9
detabify
...
llvm-svn: 49524
2008-04-11 09:34:57 +00:00
Owen Anderson
f55bae07b7
Fix PR2213 by simultaneously making GVN more aggressive with the return values
...
of calls and less aggressive with non-readnone calls.
llvm-svn: 49516
2008-04-11 05:11:49 +00:00
Evan Cheng
478e43e7a5
Remove implicit_def instructions that become dead as result of coalescing.
...
llvm-svn: 49513
2008-04-10 23:48:35 +00:00
Evan Cheng
52208a738f
Allow registers defined by implicit_def to be clobbered.
...
llvm-svn: 49512
2008-04-10 23:47:53 +00:00