Commit Graph

38397 Commits

Author SHA1 Message Date
Evan Cheng
94d7b02c5a Also LXCHG64 -> XCHG64rm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49948 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 02:05:42 +00:00
Evan Cheng
54fc97dcdc PPC32 atomic operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 01:30:48 +00:00
Evan Cheng
bb6939dcff xchg which references a memory operand does not need to lock prefix. Atomicity is guaranteed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 01:20:30 +00:00
Dan Gohman
f4423b1e45 Teach llvm-as to accept function types with multiple return types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49945 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 00:24:39 +00:00
Dale Johannesen
cf363181c1 Fix a scalar evolution bug. Reversing everything
does not work because of 0; 2>0 but -2U is also >0.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49928 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 21:38:31 +00:00
Nicolas Geoffray
dc17ab2bf0 Enable jitting with a known memory size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49924 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 20:59:31 +00:00
Duncan Sands
37bcda3de9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49923 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 20:56:03 +00:00
Dan Gohman
28269139ee 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49922 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 20:55:41 +00:00
Evan Cheng
7e03280b53 - Fix atomic operation JIT encoding.
- Remove unused instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49921 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 20:55:36 +00:00
Duncan Sands
4cc0456456 Add some more FIXME's for indexed loads and stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49916 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 20:27:12 +00:00
Duncan Sands
41edfb8ae1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49915 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 20:25:14 +00:00
Evan Cheng
a8f720d695 Correct comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49913 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 19:25:26 +00:00
Evan Cheng
883d260045 Not safe to "kill" a register if its live range extends pass the end of block branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49911 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18 19:22:23 +00:00
Evan Cheng
3f73beaeb2 Also support Intel asm syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49878 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 23:35:10 +00:00
Dan Gohman
35b31bea0d Remove the implicit conversion from SDOperandPtr to SDOperand*; this
may fix a build error on Visual Studio.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49876 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 23:02:12 +00:00
Evan Cheng
9d1a81a23c Fix assembly code for atomic operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49869 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 21:26:35 +00:00
Argyrios Kyrtzidis
0861d1fa5c Bring in uint32_t, uint64_t, and int64_t types for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49854 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 13:56:31 +00:00
Duncan Sands
fa191e4cd4 Run SimplifyLibCalls near the beginning, not at
the end.  It is now run at the same moment as in
llvm-gcc.  Also, run StripDeadPrototypes at the
end, just before running DeadTypeElimination.
This may be useful when doing LTO.  Note that
llvm-gcc runs StripDeadPrototypes but not
DeadTypeElimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49848 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 12:03:38 +00:00
Roman Levenstein
02819257a6 Minor clean-up based on Dan's comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49844 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 09:29:48 +00:00
Evan Cheng
639f493ebf 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49843 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 07:58:04 +00:00
Owen Anderson
241f65321e Make GVN able to remove unnecessary calls to read-only functions again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49842 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 05:36:50 +00:00
Bill Wendling
f231778269 Use correct name for method in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49841 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 05:20:39 +00:00
Dan Gohman
499c1bd358 Correct the SrcValue information in the Expand code for va_copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49839 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 02:09:26 +00:00
Scott Michel
5788bca1c2 Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49838 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 01:30:44 +00:00
Evan Cheng
621d157676 Fix a sub-register indice propagation bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49832 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 00:06:42 +00:00
Scott Michel
4bf393a13e Workaround for PR2207, in which pred_iterator assert gets triggered due to a
wee problem in Xcode 2.[45]/gcc 4.0.1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49831 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 23:46:39 +00:00
Evan Cheng
03eb38848c Don't forget about sub-register indices when rematting instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49830 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 23:44:44 +00:00
Dale Johannesen
5e8fb81353 Unbreak build on x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49822 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 22:24:33 +00:00
Dan Gohman
7e4d5b6002 Fix a copy+paste error in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49820 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 21:57:29 +00:00
Nicolas Geoffray
51cc3c13ea Correlate stubs with functions in JIT: when emitting a stub, the JIT tells the memory manager which function
the stub will resolve.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49814 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 20:46:05 +00:00
Eric Christopher
e20bbc8101 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49813 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 20:45:31 +00:00
Evan Cheng
9c1e06e187 After reading memory that's already freed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49810 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 20:24:25 +00:00
Nicolas Geoffray
52e724ad7e Infrastructure for getting the machine code size of a function and an instruction. X86, PowerPC and ARM are implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49809 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 20:10:13 +00:00
Evan Cheng
dc00858e11 Initialize X863DNowLevel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49808 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 19:03:02 +00:00
Evan Cheng
ff7a3e557e Fix PR2226. Avoid using uninitialized variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49807 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 18:48:43 +00:00
Bill Wendling
a5261923b4 Add "empty()" method to sys::Path and remove unnecessary whitespace.
Patch by Mikhail Glushenkov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49803 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 18:27:02 +00:00
Evan Cheng
6f0ca06296 Really test what's intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 18:21:55 +00:00
Evan Cheng
76249966ee Empty basic block should have an empty range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49800 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 18:01:08 +00:00
Dale Johannesen
48325f4b08 Don't read off end of the input array.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49799 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 17:31:41 +00:00
Roman Levenstein
9cac5259fe 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49795 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 16:15:27 +00:00
Dan Gohman
33ef2bb268 Fix a memory leak in llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 15:56:26 +00:00
Gabor Greif
917365bef1 merge of r49785 (from branches/ggreif/use-diet): pass V to dyn_cast by const reference, this avoids copy-constructing and destructing all the time. especially important if these constructors are not accessible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 11:43:47 +00:00
Evan Cheng
0d4bdde327 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 09:46:40 +00:00
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
9eb883a56a XFAIL this test for the moment. The real solution is to prevent ADCE
from transforming loops and adding a separate loop pass for removing
loops with know trip counts.  Until that happens, ADCE is miscompiling this code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49769 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:25:42 +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
Chris Lattner
036a94ed61 fix off by one error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49766 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:10:37 +00:00
Chris Lattner
c0814dc606 give smallstring some methods to do 'itoa'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 04:05:02 +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