Commit Graph

22756 Commits

Author SHA1 Message Date
Nicolas Geoffray
580631a73a Be pessimistic in computing the buffer size when aligning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50008 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 23:39:44 +00:00
Nicolas Geoffray
546e36a2c1 Don't forget to update the current operand when getting the size of an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50007 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 23:36:47 +00:00
Chris Lattner
bd3401fa98 finish the first cut of a jump threading pass implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 22:39:42 +00:00
Chris Lattner
0cfe85be0b replace a slow and verbose version of Instruction::isUsedOutsideOfBlock with
a call to Instruction::isUsedOutsideOfBlock.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50005 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 22:18:22 +00:00
Chris Lattner
7ae40e7d8a add a handy helper method to instruction, useful for determining
whether it is used outside of some block.  This can be used to see
if there are any non-local references, for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50004 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 22:11:30 +00:00
Chris Lattner
f9065a904f we can only thread blocks when there is a pred we can determine the succ of.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50003 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 21:18:09 +00:00
Chris Lattner
177480b7ed improve comments, infrastructure, and add some validity checks for threading.
Add a cost function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50002 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 21:13:06 +00:00
Chris Lattner
8383a7b7a6 Add a new Jump Threading pass, which will handle cases
such as those in PR2235.  Right now the pass is not very
effective. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50000 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 20:35:01 +00:00
Chris Lattner
3e5d1d8d08 hopefully resolve PR2240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49999 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 19:59:12 +00:00
Chris Lattner
0e4b6c7551 rearrange some code, simplify handling of shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 18:24:14 +00:00
Dale Johannesen
9dd2ce46c5 Check we aren't trying to convert PPC long double.
This fixes the testsuite failure on ppcf128-4.ll.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49994 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 18:23:46 +00:00
Nicolas Geoffray
5913e6c5db Cosmetic changes, as suggested by Evan. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49993 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 17:44:19 +00:00
Dale Johannesen
a0c8fc6f28 (re)fix handling of UGT. Pointed out by Nick Lewycky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49991 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 16:58:57 +00:00
Torok Edwin
3eaee31393 g++-4.3 build-fix: CHAR_BIT requires <climits>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49989 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 08:33:11 +00:00
Nicolas Geoffray
fd7d99120b 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 08:33:02 +00:00
Chris Lattner
bd381a777b A better fix for my previous patch, MOVZQI2PQIrr just requires SSE2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49986 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 05:52:46 +00:00
Dale Johannesen
79f82f9fd5 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49983 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 01:34:03 +00:00
Chris Lattner
d8eb63fc72 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49978 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 00:41:19 +00:00
Chris Lattner
02a260aa11 Switch to using Simplified ConstantFP::get API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 00:41:09 +00:00
Chris Lattner
eb9c8e1e3f Use simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-20 00:26:06 +00:00
Chris Lattner
d881ad2c57 Implement PR2206.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49967 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 22:17:26 +00:00
Chris Lattner
1c14c29746 refactor handling of symbolic constant folding, picking up
a few new cases( see Integer/a1.ll), but not anything that
would happen in practice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49965 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 21:58:19 +00:00
Chris Lattner
61783d7322 indentation fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49964 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 21:13:00 +00:00
Chris Lattner
bcd203cf86 Allow argpromote to promote struct arguments with a specified number
of elements.  Patch by Matthijs Kooijman!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49962 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 19:50:01 +00:00
Evan Cheng
8608f2eff2 64-bit atomic operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49949 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 02:30:38 +00:00
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
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