oota-llvm.git
16 years agoRefactor memcpyopt based on Chris' suggestions. Consolidate several functions
Owen Anderson [Mon, 21 Apr 2008 07:45:10 +0000 (07:45 +0000)]
Refactor memcpyopt based on Chris' suggestions.  Consolidate several functions
and simplify code that was fallout from the separation of memcpyopt and gvn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50034 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a "large integer implicitly truncated to unsigned type"
Duncan Sands [Mon, 21 Apr 2008 07:35:28 +0000 (07:35 +0000)]
Fix a "large integer implicitly truncated to unsigned type"
warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50033 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodon't print dominators every time it is computed with -debug.
Chris Lattner [Mon, 21 Apr 2008 06:19:02 +0000 (06:19 +0000)]
don't print dominators every time it is computed with -debug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50032 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoanother bug introduced in r47802 by nicholas, for no apparent reason.
Chris Lattner [Mon, 21 Apr 2008 06:12:55 +0000 (06:12 +0000)]
another bug introduced in r47802 by nicholas, for no apparent reason.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50031 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd an ugly note.
Chris Lattner [Mon, 21 Apr 2008 04:46:30 +0000 (04:46 +0000)]
Add an ugly note.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50029 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd jump threading to liblto.
Chris Lattner [Mon, 21 Apr 2008 04:31:40 +0000 (04:31 +0000)]
Add jump threading to liblto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50028 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorun the jump threading pass in llvm-ld also
Chris Lattner [Mon, 21 Apr 2008 04:28:40 +0000 (04:28 +0000)]
run the jump threading pass in llvm-ld also

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50027 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoenable jump threading pass by default. This causes no miscompilations
Chris Lattner [Mon, 21 Apr 2008 04:22:09 +0000 (04:22 +0000)]
enable jump threading pass by default.  This causes no miscompilations
and can significantly shrinkify some code, particularly from C++ land.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50025 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofix a bug introduced by Nicholas' "unwinds to" stuff: we
Chris Lattner [Mon, 21 Apr 2008 04:20:33 +0000 (04:20 +0000)]
fix a bug introduced by Nicholas' "unwinds to" stuff: we
lost newlines between blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50024 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agodon't assume that the argument passed to fprintf("%s" is a string. This
Chris Lattner [Mon, 21 Apr 2008 03:18:33 +0000 (03:18 +0000)]
don't assume that the argument passed to fprintf("%s"  is a string.  This
fixes a crash in opt on 433.milc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50023 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse the new SplitBlockPredecessors to implement a todo.
Chris Lattner [Mon, 21 Apr 2008 02:57:57 +0000 (02:57 +0000)]
Use the new SplitBlockPredecessors to implement a todo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50022 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.h
Chris Lattner [Mon, 21 Apr 2008 01:28:02 +0000 (01:28 +0000)]
Move SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.h
as a global helper function.  At the same type, switch it from taking
a vector of predecessors to an arbitrary sequential input.  This allows
us to switch LoopSimplify to use a SmallVector for various temporary
vectors that it passed into SplitBlockPredecessors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50020 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMove domtree/frontier updating earlier, allowing us to use it to update phi
Chris Lattner [Mon, 21 Apr 2008 01:05:08 +0000 (01:05 +0000)]
Move domtree/frontier updating earlier, allowing us to use it to update phi
nodes, removing a hack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50019 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFactor dominator tree and frontier updating into SplitBlockPredecessors
Chris Lattner [Mon, 21 Apr 2008 00:54:38 +0000 (00:54 +0000)]
Factor dominator tree and frontier updating into SplitBlockPredecessors
instead of doing it after every call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50018 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofit some more code in 80 cols.
Chris Lattner [Mon, 21 Apr 2008 00:25:49 +0000 (00:25 +0000)]
fit some more code in 80 cols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50016 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agosimplify code, fit in 80 cols.
Chris Lattner [Mon, 21 Apr 2008 00:23:14 +0000 (00:23 +0000)]
simplify code, fit in 80 cols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50015 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agofit in 80 cols
Chris Lattner [Mon, 21 Apr 2008 00:19:16 +0000 (00:19 +0000)]
fit in 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50014 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBe pessimistic in computing the buffer size when aligning.
Nicolas Geoffray [Sun, 20 Apr 2008 23:39:44 +0000 (23:39 +0000)]
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

16 years agoDon't forget to update the current operand when getting the size of an instruction.
Nicolas Geoffray [Sun, 20 Apr 2008 23:36:47 +0000 (23:36 +0000)]
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

16 years agofinish the first cut of a jump threading pass implementation.
Chris Lattner [Sun, 20 Apr 2008 22:39:42 +0000 (22:39 +0000)]
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

16 years agoreplace a slow and verbose version of Instruction::isUsedOutsideOfBlock with
Chris Lattner [Sun, 20 Apr 2008 22:18:22 +0000 (22:18 +0000)]
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

16 years agoadd a handy helper method to instruction, useful for determining
Chris Lattner [Sun, 20 Apr 2008 22:11:30 +0000 (22:11 +0000)]
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

16 years agowe can only thread blocks when there is a pred we can determine the succ of.
Chris Lattner [Sun, 20 Apr 2008 21:18:09 +0000 (21:18 +0000)]
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

16 years agoimprove comments, infrastructure, and add some validity checks for threading.
Chris Lattner [Sun, 20 Apr 2008 21:13:06 +0000 (21:13 +0000)]
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

16 years agoAdd a new Jump Threading pass, which will handle cases
Chris Lattner [Sun, 20 Apr 2008 20:35:01 +0000 (20:35 +0000)]
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

16 years agohopefully resolve PR2240
Chris Lattner [Sun, 20 Apr 2008 19:59:12 +0000 (19:59 +0000)]
hopefully resolve PR2240

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49999 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorearrange some code, simplify handling of shifts.
Chris Lattner [Sun, 20 Apr 2008 18:24:14 +0000 (18:24 +0000)]
rearrange some code, simplify handling of shifts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49995 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCheck we aren't trying to convert PPC long double.
Dale Johannesen [Sun, 20 Apr 2008 18:23:46 +0000 (18:23 +0000)]
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

16 years agoCosmetic changes, as suggested by Evan. No functionality changes.
Nicolas Geoffray [Sun, 20 Apr 2008 17:44:19 +0000 (17:44 +0000)]
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

16 years ago(re)fix handling of UGT. Pointed out by Nick Lewycky.
Dale Johannesen [Sun, 20 Apr 2008 16:58:57 +0000 (16:58 +0000)]
(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

16 years agog++-4.3 build-fix: CHAR_BIT requires <climits>.
Torok Edwin [Sun, 20 Apr 2008 08:33:11 +0000 (08:33 +0000)]
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

16 years agoDo not hold the JIT lock when materializing a function and verify if the
Nicolas Geoffray [Sun, 20 Apr 2008 08:33:02 +0000 (08:33 +0000)]
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

16 years agoA better fix for my previous patch, MOVZQI2PQIrr just requires SSE2.
Chris Lattner [Sun, 20 Apr 2008 05:52:46 +0000 (05:52 +0000)]
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

16 years agoNot all x86-64 machines have sse3 apparently.
Chris Lattner [Sun, 20 Apr 2008 05:47:56 +0000 (05:47 +0000)]
Not all x86-64 machines have sse3 apparently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49985 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCheck that APFloat::convert is not trying to target
Dale Johannesen [Sun, 20 Apr 2008 01:34:03 +0000 (01:34 +0000)]
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

16 years agoregenerate
Chris Lattner [Sun, 20 Apr 2008 00:41:19 +0000 (00:41 +0000)]
regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49978 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSwitch to using Simplified ConstantFP::get API.
Chris Lattner [Sun, 20 Apr 2008 00:41:09 +0000 (00:41 +0000)]
Switch to using Simplified ConstantFP::get API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49977 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse simplified ConstantFP::get method, fix a bug handling frem x, 0 with long doubles.
Chris Lattner [Sun, 20 Apr 2008 00:26:06 +0000 (00:26 +0000)]
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

16 years agofree(null) -> noop
Chris Lattner [Sat, 19 Apr 2008 22:41:32 +0000 (22:41 +0000)]
free(null) -> noop

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49972 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorename *.llx -> *.ll, last batch.
Chris Lattner [Sat, 19 Apr 2008 22:32:52 +0000 (22:32 +0000)]
rename *.llx -> *.ll, last batch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49971 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorename *.llx -> *.ll
Chris Lattner [Sat, 19 Apr 2008 22:29:10 +0000 (22:29 +0000)]
rename *.llx -> *.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49970 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorename *.llx -> *.ll
Chris Lattner [Sat, 19 Apr 2008 22:26:29 +0000 (22:26 +0000)]
rename *.llx -> *.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49969 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomerge of 49966 from branches/ggreif/use-diet to trunk. these are already active API...
Gabor Greif [Sat, 19 Apr 2008 22:25:09 +0000 (22:25 +0000)]
Merge ... 49966 from branches/ggreif/use-diet to trunk. these are already active API changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49968 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement PR2206.
Chris Lattner [Sat, 19 Apr 2008 22:17:26 +0000 (22:17 +0000)]
Implement PR2206.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49967 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agorefactor handling of symbolic constant folding, picking up
Chris Lattner [Sat, 19 Apr 2008 21:58:19 +0000 (21:58 +0000)]
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

16 years agoindentation fix.
Chris Lattner [Sat, 19 Apr 2008 21:13:00 +0000 (21:13 +0000)]
indentation fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49964 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSome clarifications suggested by Jon Sargeant
Chris Lattner [Sat, 19 Apr 2008 21:01:16 +0000 (21:01 +0000)]
Some clarifications suggested by Jon Sargeant

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49963 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAllow argpromote to promote struct arguments with a specified number
Chris Lattner [Sat, 19 Apr 2008 19:50:01 +0000 (19:50 +0000)]
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

16 years ago64-bit atomic operations.
Evan Cheng [Sat, 19 Apr 2008 02:30:38 +0000 (02:30 +0000)]
64-bit atomic operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49949 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAlso LXCHG64 -> XCHG64rm.
Evan Cheng [Sat, 19 Apr 2008 02:05:42 +0000 (02:05 +0000)]
Also LXCHG64 -> XCHG64rm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49948 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPPC32 atomic operations.
Evan Cheng [Sat, 19 Apr 2008 01:30:48 +0000 (01:30 +0000)]
PPC32 atomic operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49947 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoxchg which references a memory operand does not need to lock prefix. Atomicity is...
Evan Cheng [Sat, 19 Apr 2008 01:20:30 +0000 (01:20 +0000)]
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

16 years agoTeach llvm-as to accept function types with multiple return types.
Dan Gohman [Sat, 19 Apr 2008 00:24:39 +0000 (00:24 +0000)]
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

16 years agoFix a scalar evolution bug. Reversing everything
Dale Johannesen [Fri, 18 Apr 2008 21:38:31 +0000 (21:38 +0000)]
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

16 years agoEnable jitting with a known memory size.
Nicolas Geoffray [Fri, 18 Apr 2008 20:59:31 +0000 (20:59 +0000)]
Enable jitting with a known memory size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49924 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImplement a bit more softfloat support in
Duncan Sands [Fri, 18 Apr 2008 20:56:03 +0000 (20:56 +0000)]
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

16 years agoFix the handling of va_copy on x86-64. As of llvm-gcc r49920
Dan Gohman [Fri, 18 Apr 2008 20:55:41 +0000 (20:55 +0000)]
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

16 years ago- Fix atomic operation JIT encoding.
Evan Cheng [Fri, 18 Apr 2008 20:55:36 +0000 (20:55 +0000)]
- 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

16 years agoAdd some more FIXME's for indexed loads and stores.
Duncan Sands [Fri, 18 Apr 2008 20:27:12 +0000 (20:27 +0000)]
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

16 years agoProvide an explicit list of operands to MakeLibcall,
Duncan Sands [Fri, 18 Apr 2008 20:25:14 +0000 (20:25 +0000)]
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

16 years agoCorrect comment.
Evan Cheng [Fri, 18 Apr 2008 19:25:26 +0000 (19:25 +0000)]
Correct comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49913 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNot safe to "kill" a register if its live range extends pass the end of block branch.
Evan Cheng [Fri, 18 Apr 2008 19:22:23 +0000 (19:22 +0000)]
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

16 years agoAlso support Intel asm syntax.
Evan Cheng [Thu, 17 Apr 2008 23:35:10 +0000 (23:35 +0000)]
Also support Intel asm syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49878 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove the implicit conversion from SDOperandPtr to SDOperand*; this
Dan Gohman [Thu, 17 Apr 2008 23:02:12 +0000 (23:02 +0000)]
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

16 years agoFix assembly code for atomic operations.
Evan Cheng [Thu, 17 Apr 2008 21:26:35 +0000 (21:26 +0000)]
Fix assembly code for atomic operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49869 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoBring in uint32_t, uint64_t, and int64_t types for MSVC.
Argyrios Kyrtzidis [Thu, 17 Apr 2008 13:56:31 +0000 (13:56 +0000)]
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

16 years agoRun SimplifyLibCalls near the beginning, not at
Duncan Sands [Thu, 17 Apr 2008 12:03:38 +0000 (12:03 +0000)]
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

16 years agoMinor clean-up based on Dan's comments.
Roman Levenstein [Thu, 17 Apr 2008 09:29:48 +0000 (09:29 +0000)]
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

16 years agoBe more careful with insert_subreg and extract_subreg where either source or destinat...
Evan Cheng [Thu, 17 Apr 2008 07:58:04 +0000 (07:58 +0000)]
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

16 years agoMake GVN able to remove unnecessary calls to read-only functions again.
Owen Anderson [Thu, 17 Apr 2008 05:36:50 +0000 (05:36 +0000)]
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

16 years agoUse correct name for method in comment.
Bill Wendling [Thu, 17 Apr 2008 05:20:39 +0000 (05:20 +0000)]
Use correct name for method in comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49841 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCorrect the SrcValue information in the Expand code for va_copy.
Dan Gohman [Thu, 17 Apr 2008 02:09:26 +0000 (02:09 +0000)]
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

16 years agoRemove unused variable
Scott Michel [Thu, 17 Apr 2008 01:30:44 +0000 (01:30 +0000)]
Remove unused variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49838 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a sub-register indice propagation bug.
Evan Cheng [Thu, 17 Apr 2008 00:06:42 +0000 (00:06 +0000)]
Fix a sub-register indice propagation bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49832 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWorkaround for PR2207, in which pred_iterator assert gets triggered due to a
Scott Michel [Wed, 16 Apr 2008 23:46:39 +0000 (23:46 +0000)]
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

16 years agoDon't forget about sub-register indices when rematting instructions.
Evan Cheng [Wed, 16 Apr 2008 23:44:44 +0000 (23:44 +0000)]
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

16 years agoUnbreak build on x86-64.
Dale Johannesen [Wed, 16 Apr 2008 22:24:33 +0000 (22:24 +0000)]
Unbreak build on x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49822 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a copy+paste error in a comment.
Dan Gohman [Wed, 16 Apr 2008 21:57:29 +0000 (21:57 +0000)]
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

16 years agoCorrelate stubs with functions in JIT: when emitting a stub, the JIT tells the memory...
Nicolas Geoffray [Wed, 16 Apr 2008 20:46:05 +0000 (20:46 +0000)]
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

16 years agoFix comment.
Eric Christopher [Wed, 16 Apr 2008 20:45:31 +0000 (20:45 +0000)]
Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49813 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAfter reading memory that's already freed.
Evan Cheng [Wed, 16 Apr 2008 20:24:25 +0000 (20:24 +0000)]
After reading memory that's already freed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49810 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInfrastructure for getting the machine code size of a function and an instruction...
Nicolas Geoffray [Wed, 16 Apr 2008 20:10:13 +0000 (20:10 +0000)]
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

16 years agoInitialize X863DNowLevel.
Evan Cheng [Wed, 16 Apr 2008 19:03:02 +0000 (19:03 +0000)]
Initialize X863DNowLevel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49808 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2226. Avoid using uninitialized variables.
Evan Cheng [Wed, 16 Apr 2008 18:48:43 +0000 (18:48 +0000)]
Fix PR2226. Avoid using uninitialized variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49807 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd "empty()" method to sys::Path and remove unnecessary whitespace.
Bill Wendling [Wed, 16 Apr 2008 18:27:02 +0000 (18:27 +0000)]
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

16 years agoReally test what's intended.
Evan Cheng [Wed, 16 Apr 2008 18:21:55 +0000 (18:21 +0000)]
Really test what's intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49802 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEmpty basic block should have an empty range.
Evan Cheng [Wed, 16 Apr 2008 18:01:08 +0000 (18:01 +0000)]
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

16 years agoDon't read off end of the input array.
Dale Johannesen [Wed, 16 Apr 2008 17:31:41 +0000 (17:31 +0000)]
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

16 years agoOngoing work on improving the instruction selection infrastructure:
Roman Levenstein [Wed, 16 Apr 2008 16:15:27 +0000 (16:15 +0000)]
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

16 years agoFix a memory leak in llc.
Dan Gohman [Wed, 16 Apr 2008 15:56:26 +0000 (15:56 +0000)]
Fix a memory leak in llc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49793 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agomerge of r49785 (from branches/ggreif/use-diet): pass V to dyn_cast by const referenc...
Gabor Greif [Wed, 16 Apr 2008 11:43:47 +0000 (11:43 +0000)]
Merge ... 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

16 years agoRewrite LiveVariable liveness computation. The new implementation is much simplified...
Evan Cheng [Wed, 16 Apr 2008 09:46:40 +0000 (09:46 +0000)]
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

16 years agoCode clean up.
Evan Cheng [Wed, 16 Apr 2008 09:41:59 +0000 (09:41 +0000)]
Code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49783 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoXFAIL this test for the moment. The real solution is to prevent ADCE
Owen Anderson [Wed, 16 Apr 2008 04:25:42 +0000 (04:25 +0000)]
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

16 years agoMajor repairs to the post-dominators implementation. Patch from Florian Brandner!
Owen Anderson [Wed, 16 Apr 2008 04:21:16 +0000 (04:21 +0000)]
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

16 years agofix off by one error.
Chris Lattner [Wed, 16 Apr 2008 04:10:37 +0000 (04:10 +0000)]
fix off by one error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49766 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agogive smallstring some methods to do 'itoa'.
Chris Lattner [Wed, 16 Apr 2008 04:05:02 +0000 (04:05 +0000)]
give smallstring some methods to do 'itoa'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49765 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for the form of the SSE41 extractps instruction that
Dan Gohman [Wed, 16 Apr 2008 02:32:24 +0000 (02:32 +0000)]
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

16 years agoRecreate the size SDNode instead of reusing the old one in the x86
Dan Gohman [Wed, 16 Apr 2008 01:32:32 +0000 (01:32 +0000)]
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

16 years agoAvoid read after free.
Evan Cheng [Wed, 16 Apr 2008 01:22:28 +0000 (01:22 +0000)]
Avoid read after free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49760 91177308-0d34-0410-b5e6-96231b3b80d8