oota-llvm.git
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

16 years agoRemove X86_64SRet; it isn't used anymore.
Dan Gohman [Wed, 16 Apr 2008 00:24:30 +0000 (00:24 +0000)]
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

16 years agoAdd movd instructions to move from MMX registers
Dan Gohman [Tue, 15 Apr 2008 23:55:07 +0000 (23:55 +0000)]
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

16 years agoAdd an svn:ignore for the test Output directory.
Dan Gohman [Tue, 15 Apr 2008 23:19:16 +0000 (23:19 +0000)]
Add an svn:ignore for the test Output directory.

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

16 years agoFix the new scheduler assertion checks to work when
Dan Gohman [Tue, 15 Apr 2008 22:40:14 +0000 (22:40 +0000)]
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

16 years agoApple GCC 4.2 builds things differently. It no longer spawns a bunch of
Bill Wendling [Tue, 15 Apr 2008 21:33:52 +0000 (21:33 +0000)]
Apple GCC 4.2 builds things differently. It no longer spawns a bunch of
processes, but requires the project to use -j.

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

16 years agoVisualStudio project files updated. #include <algorithm> added to make VisualStudio...
Chuck Rose III [Tue, 15 Apr 2008 21:27:11 +0000 (21:27 +0000)]
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

16 years agoMake 64-to-32 bit truncations explicit (prevent warnings).
Dale Johannesen [Tue, 15 Apr 2008 18:44:59 +0000 (18:44 +0000)]
Make 64-to-32 bit truncations explicit (prevent warnings).
All values here fit in 32 bits.

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

16 years agoDon't assume a tail call can't reference a byval
Dale Johannesen [Tue, 15 Apr 2008 17:41:34 +0000 (17:41 +0000)]
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

16 years agoUse gv's --spartan option, which trades away an extra row of UI buttons
Dan Gohman [Tue, 15 Apr 2008 17:27:05 +0000 (17:27 +0000)]
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

16 years agoA couple minor fixes suggested by Matthijs Kooijman
Chris Lattner [Tue, 15 Apr 2008 16:59:22 +0000 (16:59 +0000)]
A couple minor fixes suggested by Matthijs Kooijman

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

16 years agoChange Divided flag to Split, as suggested by Evan
Nicolas Geoffray [Tue, 15 Apr 2008 08:08:50 +0000 (08:08 +0000)]
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

16 years agoSort sub-registers and super-registers lists according to super-sub register relation...
Evan Cheng [Tue, 15 Apr 2008 07:56:03 +0000 (07:56 +0000)]
Sort sub-registers and super-registers lists according to super-sub register relations. e.g. X86::RAX sub-register list is EAX, AX, AL, AH (order of last two are not guaranteed).

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

16 years agoInstall into the directory
Bill Wendling [Tue, 15 Apr 2008 07:02:59 +0000 (07:02 +0000)]
Install into the  directory

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

16 years agoTreat EntryToken nodes as "passive" so that they aren't added to the
Dan Gohman [Tue, 15 Apr 2008 01:22:18 +0000 (01:22 +0000)]
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

16 years agoIn -view-sunit-dags, display "special" chain dependencies as cyan
Dan Gohman [Mon, 14 Apr 2008 23:15:07 +0000 (23:15 +0000)]
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

16 years agoRemove unnecessary <sstream> includes.
Dan Gohman [Mon, 14 Apr 2008 20:40:47 +0000 (20:40 +0000)]
Remove unnecessary <sstream> includes.

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

16 years agoAvoid creating MERGE_VALUES nodes for single values.
Dan Gohman [Mon, 14 Apr 2008 18:43:25 +0000 (18:43 +0000)]
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

16 years agoTeach AliasSetTracker about VAArgInst.
Dan Gohman [Mon, 14 Apr 2008 18:34:50 +0000 (18:34 +0000)]
Teach AliasSetTracker about VAArgInst.

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

16 years agoMinor whitespace and comment cleanups.
Dan Gohman [Mon, 14 Apr 2008 18:26:16 +0000 (18:26 +0000)]
Minor whitespace and comment cleanups.

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

16 years agoIn the special case, call the comparison function instead of
Dan Gohman [Mon, 14 Apr 2008 18:23:56 +0000 (18:23 +0000)]
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

16 years agoUpgrade these tests for the current intrinsic prototypes.
Dan Gohman [Mon, 14 Apr 2008 18:19:18 +0000 (18:19 +0000)]
Upgrade these tests for the current intrinsic prototypes.

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

16 years agoRemove -unwind-tables-optional everywhere, since
Dale Johannesen [Mon, 14 Apr 2008 17:56:54 +0000 (17:56 +0000)]
Remove -unwind-tables-optional everywhere, since
this is now the default.

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

16 years agoFix const-correctness issues with the SrcValue handling in the
Dan Gohman [Mon, 14 Apr 2008 17:55:48 +0000 (17:55 +0000)]
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

16 years agoReverse sense of unwind-tables option. This means
Dale Johannesen [Mon, 14 Apr 2008 17:54:17 +0000 (17:54 +0000)]
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

16 years agoClean up some comments.
Dan Gohman [Mon, 14 Apr 2008 17:45:20 +0000 (17:45 +0000)]
Clean up some comments.

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

16 years agoRevert r49614. As Dan pointed out, some of these aren't correct.
Owen Anderson [Mon, 14 Apr 2008 17:38:21 +0000 (17:38 +0000)]
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

16 years agoFix /test/CodeGen/PowerPC/big-endian-actual-args.ll for linux/ppc32
Nicolas Geoffray [Mon, 14 Apr 2008 17:17:14 +0000 (17:17 +0000)]
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

16 years agoimprove diagnostics in call parsing, patch suggested by
Chris Lattner [Mon, 14 Apr 2008 16:44:41 +0000 (16:44 +0000)]
improve diagnostics in call parsing, patch suggested by
Matthijs Kooijman

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

16 years agoVAArg may trap.
Dan Gohman [Mon, 14 Apr 2008 15:07:08 +0000 (15:07 +0000)]
VAArg may trap.

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

16 years agoInitial libcall support for LegalizeTypes. This is
Duncan Sands [Mon, 14 Apr 2008 06:48:48 +0000 (06:48 +0000)]
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

16 years agoadd a new CallGraphNode::removeCallEdgeFor method, tidy some comments.
Chris Lattner [Sun, 13 Apr 2008 19:41:25 +0000 (19:41 +0000)]
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

16 years agoAdd support for equality comparison of CallSite's.
Chris Lattner [Sun, 13 Apr 2008 19:40:26 +0000 (19:40 +0000)]
Add support for equality comparison of CallSite's.

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

16 years agoReplace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
Owen Anderson [Sun, 13 Apr 2008 19:15:17 +0000 (19:15 +0000)]
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

16 years agoLegalizeTypes can sometimes have deleted nodes
Duncan Sands [Sun, 13 Apr 2008 16:04:03 +0000 (16:04 +0000)]
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

16 years agoAdd a divided flag for the first piece of an argument divided into mulitple parts...
Nicolas Geoffray [Sun, 13 Apr 2008 13:40:22 +0000 (13:40 +0000)]
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

16 years agoThe functionality being tested was removed because it was horribly unsafe.
Owen Anderson [Sun, 13 Apr 2008 09:51:06 +0000 (09:51 +0000)]
The functionality being tested was removed because it was horribly unsafe.

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

16 years agoFix some serious logic errors that broke the jit on darwin/x86-64.
Chris Lattner [Sun, 13 Apr 2008 07:04:56 +0000 (07:04 +0000)]
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

16 years agoMerge LLVMBuilder and FoldingBuilder, calling
Duncan Sands [Sun, 13 Apr 2008 06:22:09 +0000 (06:22 +0000)]
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

16 years agoGabor points out that reserveOperandSpace takes # of values,
Chris Lattner [Sun, 13 Apr 2008 00:14:42 +0000 (00:14 +0000)]
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

16 years agoProvide option for stack alignment override
Anton Korobeynikov [Sat, 12 Apr 2008 22:12:22 +0000 (22:12 +0000)]
Provide option for stack alignment override

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

16 years agoThis patch corrects the handling of byval arguments for tailcall
Arnold Schwaighofer [Sat, 12 Apr 2008 18:11:06 +0000 (18:11 +0000)]
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

16 years agoFactor some libcall code.
Duncan Sands [Sat, 12 Apr 2008 17:14:18 +0000 (17:14 +0000)]
Factor some libcall code.

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

16 years agoDrop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal
Dan Gohman [Sat, 12 Apr 2008 04:36:06 +0000 (04:36 +0000)]
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