oota-llvm.git
16 years agorearrange some code, no functionality change.
Chris Lattner [Sun, 9 Mar 2008 07:58:04 +0000 (07:58 +0000)]
rearrange some code, no functionality change.

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

16 years agofix 80 col violation
Chris Lattner [Sun, 9 Mar 2008 07:51:01 +0000 (07:51 +0000)]
fix 80 col violation

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

16 years agoFirstly, having a BranchInst isn't exclusive with having an unwind_to.
Nick Lewycky [Sun, 9 Mar 2008 07:50:37 +0000 (07:50 +0000)]
Firstly, having a BranchInst isn't exclusive with having an unwind_to.
Secondly, we have to check whether the branch is actually pointing to the block
with the unwind in it. We could have gotten here because of the unwind_to alone.

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

16 years agoclaim ST(x) registers are 80 bits, which is true. This doesn't affect
Chris Lattner [Sun, 9 Mar 2008 07:49:01 +0000 (07:49 +0000)]
claim ST(x) registers are 80 bits, which is true.  This doesn't affect
codegen yet because these can't be spilled (they don't exist until after RA).

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

16 years agoextend fp values with FP_EXTEND not FP_ROUND.
Chris Lattner [Sun, 9 Mar 2008 07:47:22 +0000 (07:47 +0000)]
extend fp values with FP_EXTEND not FP_ROUND.

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

16 years agoA BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_to
Nick Lewycky [Sun, 9 Mar 2008 07:36:38 +0000 (07:36 +0000)]
A BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_to
at all.

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

16 years agoThis patch cleans up the OCaml bindings so that they format nicely with
Gordon Henriksen [Sun, 9 Mar 2008 07:17:38 +0000 (07:17 +0000)]
This patch cleans up the OCaml bindings so that they format nicely with
ocamldoc. It does not yet hook into the build system, though.

Patch by Erick Tryzelaar!

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

16 years agorename FP_SETRESULT -> FP_SET_ST0
Chris Lattner [Sun, 9 Mar 2008 07:08:44 +0000 (07:08 +0000)]
rename FP_SETRESULT -> FP_SET_ST0

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

16 years agorename FpGETRESULT32 -> FpGET_ST0_32 etc. Add support for
Chris Lattner [Sun, 9 Mar 2008 07:05:32 +0000 (07:05 +0000)]
rename FpGETRESULT32 -> FpGET_ST0_32 etc.  Add support for
isel'ing value preserving FP roundings from one fp stack reg to another
into a noop, instead of stack traffic.

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

16 years agoreduce this testcase more
Chris Lattner [Sun, 9 Mar 2008 06:57:21 +0000 (06:57 +0000)]
reduce this testcase more

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

16 years agoFinish implementing a readme entry: when inserting an i64 variable
Chris Lattner [Sun, 9 Mar 2008 05:42:06 +0000 (05:42 +0000)]
Finish implementing a readme entry: when inserting an i64 variable
into a vector of zeros or undef, and when the top part is obviously
zero, we can just use movd + shuffle.  This allows us to compile
vec_set-B.ll into:

_test3:
movl $1234567, %eax
andl 4(%esp), %eax
movd %eax, %xmm0
ret

instead of:

_test3:
subl $28, %esp
movl $1234567, %eax
andl 32(%esp), %eax
movl %eax, (%esp)
movl $0, 4(%esp)
movq (%esp), %xmm0
addl $28, %esp
ret

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

16 years agoUpdate the block cloner which fixes bugpoint on code using unwind_to (phew!)
Nick Lewycky [Sun, 9 Mar 2008 05:24:34 +0000 (05:24 +0000)]
Update the block cloner which fixes bugpoint on code using unwind_to (phew!)
and also update the cloning interface's major user, the loop optimizations.

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

16 years agoUpdate the inliner and simplifycfg to handle unwind_to.
Nick Lewycky [Sun, 9 Mar 2008 05:10:13 +0000 (05:10 +0000)]
Update the inliner and simplifycfg to handle unwind_to.

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

16 years agoTwo things. Preserve the unwind_to when splitting a BB.
Nick Lewycky [Sun, 9 Mar 2008 05:04:48 +0000 (05:04 +0000)]
Two things. Preserve the unwind_to when splitting a BB.
Add the ability to remove just one instance of a BB from a phi node. This fixes
the compile error in the tree now.

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

16 years agoPrune the unwind_to labels on BBs that don't need them. Another step in the
Nick Lewycky [Sun, 9 Mar 2008 04:55:16 +0000 (04:55 +0000)]
Prune the unwind_to labels on BBs that don't need them. Another step in the
removal of invoke, PR1269.

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

16 years agoadd a note
Chris Lattner [Sun, 9 Mar 2008 01:08:22 +0000 (01:08 +0000)]
add a note

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

16 years agoImplement a readme entry, compiling
Chris Lattner [Sun, 9 Mar 2008 01:05:04 +0000 (01:05 +0000)]
Implement a readme entry, compiling
#include <xmmintrin.h>
__m128i doload64(short x) {return _mm_set_epi16(0,0,0,0,0,0,0,1);}

into:
movl $1, %eax
movd %eax, %xmm0
ret

instead of a constant pool load.

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

16 years agoupgrade this test
Chris Lattner [Sun, 9 Mar 2008 00:32:10 +0000 (00:32 +0000)]
upgrade this test

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

16 years agomake this test harder
Chris Lattner [Sun, 9 Mar 2008 00:30:06 +0000 (00:30 +0000)]
make this test harder

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

16 years agoFix two problems in SelectionDAGLegalize::ExpandBUILD_VECTOR's handling
Chris Lattner [Sun, 9 Mar 2008 00:29:42 +0000 (00:29 +0000)]
Fix two problems in SelectionDAGLegalize::ExpandBUILD_VECTOR's handling
of BUILD_VECTORS that only have two unique elements:

1. The previous code was nondeterminstic, because it walked a map in
   SDOperand order, which isn't determinstic.
2. The previous code didn't handle the case when one element was undef
   very well.  Now we ensure that the generated shuffle mask has the
   undef vector on the RHS (instead of potentially being on the LHS)
   and that any elements that refer to it are themselves undef.  This
   allows us to compile CodeGen/X86/vec_set-9.ll into:

_test3:
movd %rdi, %xmm0
punpcklqdq %xmm0, %xmm0
ret

instead of:

_test3:
movd %rdi, %xmm1
#IMPLICIT_DEF %xmm0
punpcklqdq %xmm1, %xmm0
ret

... saving a register.

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

16 years agoTeach SD some vector identities, allowing us to compile vec_set-9 into:
Chris Lattner [Sat, 8 Mar 2008 23:43:36 +0000 (23:43 +0000)]
Teach SD some vector identities, allowing us to compile vec_set-9 into:

_test3:
movd %rdi, %xmm1
#IMPLICIT_DEF %xmm0
punpcklqdq %xmm1, %xmm0
ret

instead of:

_test3:
#IMPLICIT_DEF %rax
movd %rax, %xmm0
movd %rdi, %xmm1
punpcklqdq %xmm1, %xmm0
ret

This is still not ideal.  There is no reason to two xmm regs.

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

16 years ago1) Improve comments.
Chris Lattner [Sat, 8 Mar 2008 22:59:52 +0000 (22:59 +0000)]
1) Improve comments.
2) Don't try to insert an i64 value into the low part of a
   vector with movq on an x86-32 target.  This allows us to
   compile:

__m128i doload64(short x) {return _mm_set_epi16(0,0,0,0,0,0,0,1);}

into:

_doload64:
movaps LCPI1_0, %xmm0
ret

instead of:

_doload64:
subl $28, %esp
movl $0, 4(%esp)
movl $1, (%esp)
movq (%esp), %xmm0
addl $28, %esp
ret

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

16 years agominor simplifications to this code, don't create a dead
Chris Lattner [Sat, 8 Mar 2008 22:48:29 +0000 (22:48 +0000)]
minor simplifications to this code, don't create a dead
SCALAR_TO_VECTOR on paths that end up not using it.

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

16 years agoThis one looks easy, add a note.
Chris Lattner [Sat, 8 Mar 2008 22:32:39 +0000 (22:32 +0000)]
This one looks easy, add a note.

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

16 years agomove these to the appropriate file
Chris Lattner [Sat, 8 Mar 2008 22:28:45 +0000 (22:28 +0000)]
move these to the appropriate file

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

16 years agoNot all users of a BB are Instructions any more.
Nick Lewycky [Sat, 8 Mar 2008 07:48:41 +0000 (07:48 +0000)]
Not all users of a BB are Instructions any more.

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

16 years agoLoad the symbols first so that the interpreter constructor can find them when
Nick Lewycky [Sat, 8 Mar 2008 02:49:45 +0000 (02:49 +0000)]
Load the symbols first so that the interpreter constructor can find them when
it tries to initialize them.

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

16 years agomuch simpler test case
Andrew Lenharth [Sat, 8 Mar 2008 02:05:22 +0000 (02:05 +0000)]
much simpler test case

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

16 years agoRemove unused runPass methods.
Dan Gohman [Sat, 8 Mar 2008 01:43:56 +0000 (01:43 +0000)]
Remove unused runPass methods.

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

16 years agoMore ppc32 byval handling (bug fixes). Things
Dale Johannesen [Sat, 8 Mar 2008 01:41:42 +0000 (01:41 +0000)]
More ppc32 byval handling (bug fixes).  Things
are looking pretty good now.

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

16 years agoImplement x86 support for @llvm.prefetch. It corresponds to prefetcht{0|1|2} and...
Evan Cheng [Sat, 8 Mar 2008 00:58:38 +0000 (00:58 +0000)]
Implement x86 support for @llvm.prefetch. It corresponds to prefetcht{0|1|2} and prefetchnta instructions.

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

16 years agoAdd support for calls with i128 return values on ppc64.
Dan Gohman [Sat, 8 Mar 2008 00:19:12 +0000 (00:19 +0000)]
Add support for calls with i128 return values on ppc64.

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

16 years agoSomething that kills a super-register also
Bill Wendling [Fri, 7 Mar 2008 23:45:15 +0000 (23:45 +0000)]
Something that kills a super-register also
kills the sub-register.

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

16 years agoFix a typo. It's causing consumer-typeset to miscompile. Perhaps more.
Evan Cheng [Fri, 7 Mar 2008 22:39:49 +0000 (22:39 +0000)]
Fix a typo. It's causing consumer-typeset to miscompile. Perhaps more.

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

16 years agoThere is no killUse.
Dan Gohman [Fri, 7 Mar 2008 22:24:41 +0000 (22:24 +0000)]
There is no killUse.

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

16 years agoadd dropped section test case for PR2123
Andrew Lenharth [Fri, 7 Mar 2008 21:19:43 +0000 (21:19 +0000)]
add dropped section test case for PR2123

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

16 years agoAdd new sretpromotion pass.
Devang Patel [Fri, 7 Mar 2008 21:07:34 +0000 (21:07 +0000)]
Add new sretpromotion pass.

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

16 years agoPPC64 passes arguments of integral type in i64 registers, not i32. Reflect this
Bill Wendling [Fri, 7 Mar 2008 20:49:02 +0000 (20:49 +0000)]
PPC64 passes arguments of integral type in i64 registers, not i32. Reflect this
by promoting smaller integral values (i32 at this point) to i64, then truncating
to get the wanted size.

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

16 years agoAdd support for lowering 128-bit shifts on ppc64.
Dan Gohman [Fri, 7 Mar 2008 20:36:53 +0000 (20:36 +0000)]
Add support for lowering 128-bit shifts on ppc64.

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

16 years agoNext bits of PPC byval handling. Basically functional
Dale Johannesen [Fri, 7 Mar 2008 20:27:40 +0000 (20:27 +0000)]
Next bits of PPC byval handling.  Basically functional
but there are bugs.

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

16 years agoAdd support for ppc64 shifts with 7-bit (oversized) shift amount (e.g. PPCshl).
Chris Lattner [Fri, 7 Mar 2008 20:18:24 +0000 (20:18 +0000)]
Add support for ppc64 shifts with 7-bit (oversized) shift amount (e.g. PPCshl).

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

16 years agoReplace SDT_PPCShiftOp in favor of SDTIntBinOps. This allows it to work
Chris Lattner [Fri, 7 Mar 2008 20:13:51 +0000 (20:13 +0000)]
Replace SDT_PPCShiftOp in favor of SDTIntBinOps.  This allows it to work
with 32 or 64-bit operands/results.

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

16 years agoFixed a register scavenger bug. If a def is re-defining part of a super register...
Evan Cheng [Fri, 7 Mar 2008 20:12:54 +0000 (20:12 +0000)]
Fixed a register scavenger bug. If a def is re-defining part of a super register, there must be an implicit def of the super-register on the MI.

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

16 years agoonly extract main if the user didn't specify anything to extract
Andrew Lenharth [Fri, 7 Mar 2008 20:10:54 +0000 (20:10 +0000)]
only extract main if the user didn't specify anything to extract

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

16 years agoRetVal is not used when there are more then one return operands.
Devang Patel [Fri, 7 Mar 2008 20:08:07 +0000 (20:08 +0000)]
RetVal is not used when there are more then one return operands.

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

16 years agomake error message reflect default search function name
Andrew Lenharth [Fri, 7 Mar 2008 20:07:24 +0000 (20:07 +0000)]
make error message reflect default search function name

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

16 years agoUpdate inliner to handle functions that return multiple values.
Devang Patel [Fri, 7 Mar 2008 20:06:16 +0000 (20:06 +0000)]
Update inliner to handle functions that return multiple values.

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

16 years agofix 80 col violations
Chris Lattner [Fri, 7 Mar 2008 20:05:43 +0000 (20:05 +0000)]
fix 80 col violations

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

16 years agoPlace for sret promotion tests.
Devang Patel [Fri, 7 Mar 2008 20:00:15 +0000 (20:00 +0000)]
Place for sret promotion tests.

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

16 years agoadd a pass that can extract all kinds of global values, not just functions. Update...
Andrew Lenharth [Fri, 7 Mar 2008 19:51:57 +0000 (19:51 +0000)]
add a pass that can extract all kinds of global values, not just functions.  Update llvm-extract to use it and optionally extract a global variable if you want it too

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

16 years agoCleanup some comments in the OCaml bindings.
Gordon Henriksen [Fri, 7 Mar 2008 19:13:06 +0000 (19:13 +0000)]
Cleanup some comments in the OCaml bindings.

Patch by Erick Tryzelaar.

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

16 years agoFix a typo. 'make clean' in bindings/ocaml would leave an output.
Gordon Henriksen [Fri, 7 Mar 2008 18:43:51 +0000 (18:43 +0000)]
Fix a typo. 'make clean' in bindings/ocaml would leave an output.

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

16 years agoClarify some important bits
Anton Korobeynikov [Fri, 7 Mar 2008 18:34:50 +0000 (18:34 +0000)]
Clarify some important bits

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

16 years agoSmall cleanup: propagate thread-localness via generic routine.
Anton Korobeynikov [Fri, 7 Mar 2008 18:32:18 +0000 (18:32 +0000)]
Small cleanup: propagate thread-localness via generic routine.
No functionality change.

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

16 years agoRegenerate.
Gordon Henriksen [Fri, 7 Mar 2008 18:20:01 +0000 (18:20 +0000)]
Regenerate.

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

16 years agoPrefer to use ocamlc.opt to ocamlc and soforth.
Gordon Henriksen [Fri, 7 Mar 2008 18:19:47 +0000 (18:19 +0000)]
Prefer to use ocamlc.opt to ocamlc and soforth.
These natively compiled versions are faster.

Patch by Erick Tryzelaar!

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

16 years agomark frem as expand for all legal fp types on x86, regardless of whether
Chris Lattner [Fri, 7 Mar 2008 06:36:32 +0000 (06:36 +0000)]
mark frem as expand for all legal fp types on x86, regardless of whether
we're using SSE or not.  This fixes PR2122.

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

16 years agoAdd testcase.
Bill Wendling [Thu, 6 Mar 2008 23:34:22 +0000 (23:34 +0000)]
Add testcase.

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

16 years agoWhen setting the "unused" info, take into account something like this:
Bill Wendling [Thu, 6 Mar 2008 23:22:43 +0000 (23:22 +0000)]
When setting the "unused" info, take into account something like this:

    %r3<def> = OR %x3<kill>, %x3

We don't want to mark the %r3 as unused even though it's a sub-register of %x3.

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

16 years ago80 col violation.
Evan Cheng [Thu, 6 Mar 2008 17:42:34 +0000 (17:42 +0000)]
80 col violation.

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

16 years agosome more spelling changes
Gabor Greif [Thu, 6 Mar 2008 10:51:21 +0000 (10:51 +0000)]
some more spelling changes

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

16 years agofix typos
Gabor Greif [Thu, 6 Mar 2008 10:36:00 +0000 (10:36 +0000)]
fix typos

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

16 years agoConstant fold SIGN_EXTEND_INREG with ashr not lshr.
Evan Cheng [Thu, 6 Mar 2008 08:20:51 +0000 (08:20 +0000)]
Constant fold SIGN_EXTEND_INREG with ashr not lshr.

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

16 years agoExercise the new CFG change.
Nick Lewycky [Thu, 6 Mar 2008 06:55:58 +0000 (06:55 +0000)]
Exercise the new CFG change.

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

16 years agoTreat BBs that use BBs as proper predecessors and successors in the CFG.
Nick Lewycky [Thu, 6 Mar 2008 06:54:53 +0000 (06:54 +0000)]
Treat BBs that use BBs as proper predecessors and successors in the CFG.

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

16 years agoCommit the testcase too.
Nick Lewycky [Thu, 6 Mar 2008 06:50:03 +0000 (06:50 +0000)]
Commit the testcase too.

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

16 years agoDon't try to simplify urem and srem using arithmetic rules that don't work
Nick Lewycky [Thu, 6 Mar 2008 06:48:30 +0000 (06:48 +0000)]
Don't try to simplify urem and srem using arithmetic rules that don't work
under modulo (overflow). Fixes PR1933.

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

16 years agoRefine Cell's i64 constant generation code to cover more constants where the
Scott Michel [Thu, 6 Mar 2008 04:02:54 +0000 (04:02 +0000)]
Refine Cell's i64 constant generation code to cover more constants where the
upper and lower 32-bits are the same (in addition to 0 and -1 previously.)

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

16 years agogcc likes things spelled correctly
Andrew Lenharth [Wed, 5 Mar 2008 23:41:37 +0000 (23:41 +0000)]
gcc likes things spelled correctly

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

16 years agoSkip, for now, callsites where use of sret argument is not dominated by callsite.
Devang Patel [Wed, 5 Mar 2008 23:39:23 +0000 (23:39 +0000)]
Skip, for now, callsites where use of sret argument is not dominated by callsite.

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

16 years agoNext bit of PPC ByVal handling; call-site code seems
Dale Johannesen [Wed, 5 Mar 2008 23:31:27 +0000 (23:31 +0000)]
Next bit of PPC ByVal handling; call-site code seems
correct now.

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

16 years agoMissed patch from my last commit
Anton Korobeynikov [Wed, 5 Mar 2008 23:21:39 +0000 (23:21 +0000)]
Missed patch from my last commit

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

16 years agoResolve aliases to aliasees, where possible
Anton Korobeynikov [Wed, 5 Mar 2008 23:08:47 +0000 (23:08 +0000)]
Resolve aliases to aliasees, where possible

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

16 years agoHandle functions as targets during linking of aliases as well
Anton Korobeynikov [Wed, 5 Mar 2008 23:08:16 +0000 (23:08 +0000)]
Handle functions as targets during linking of aliases as well

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

16 years ago- Fix support for "special" i64 immediates that can be loaded
Scott Michel [Wed, 5 Mar 2008 23:02:02 +0000 (23:02 +0000)]
- Fix support for "special" i64 immediates that can be loaded
  using IL, ILA, et. al. v2i64 and i64 are now supported by
  the select bits (SELB) instruction.

- Add missing comparison operations (testcase forthcoming)

- More multiclass refactoring.

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

16 years ago- Expand tabs to spaces.
Scott Michel [Wed, 5 Mar 2008 23:00:19 +0000 (23:00 +0000)]
- Expand tabs to spaces.
- select_bits.ll now fully functional now that PR1993 is closed. It was
  previously broken by refactoring in SPUInstrInfo.td and using multiclasses.
- Same for eqv.ll

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

16 years agoUpdate vcproj file.
Steve Naroff [Wed, 5 Mar 2008 22:30:39 +0000 (22:30 +0000)]
Update vcproj file.

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

16 years agoTry hard to link aliases. Checks can be too strict by now.
Anton Korobeynikov [Wed, 5 Mar 2008 22:22:46 +0000 (22:22 +0000)]
Try hard to link aliases. Checks can be too strict by now.

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

16 years agoFix a coalescer bug wrt how dead copy interval is shortened.
Evan Cheng [Wed, 5 Mar 2008 22:09:42 +0000 (22:09 +0000)]
Fix a coalescer bug wrt how dead copy interval is shortened.

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

16 years agoHandle 'ret' with multiple values.
Devang Patel [Wed, 5 Mar 2008 21:50:24 +0000 (21:50 +0000)]
Handle 'ret' with multiple values.

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

16 years agotest for something more interesting than not crashing
Andrew Lenharth [Wed, 5 Mar 2008 20:24:26 +0000 (20:24 +0000)]
test for something more interesting than not crashing

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

16 years agosync ops on ptrs, was breaking libgomp
Andrew Lenharth [Wed, 5 Mar 2008 19:48:27 +0000 (19:48 +0000)]
sync ops on ptrs, was breaking libgomp

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

16 years agoAdd Hybrid Cycle Detection to Andersen's analysis.
Daniel Berlin [Wed, 5 Mar 2008 19:31:47 +0000 (19:31 +0000)]
Add Hybrid Cycle Detection to Andersen's analysis.
Patch by Curtis Dunham.

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

16 years agoClarify that CALLSEQ_START..END may not be nested,
Dale Johannesen [Wed, 5 Mar 2008 19:14:03 +0000 (19:14 +0000)]
Clarify that CALLSEQ_START..END may not be nested,
and add some protection against creating such.

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

16 years agoThis patch fixes a problem encountered by the CellSPU backend where variants
Scott Michel [Wed, 5 Mar 2008 17:49:05 +0000 (17:49 +0000)]
This patch fixes a problem encountered by the CellSPU backend where variants
were being pruned in patterns where a variable was used more than once, e.g.:

  (or (and R32C:$rA, R32C:$rC), (and R32C:$rB, (not R32C:$rC)))

In this example, $rC is used more than once and is actually significant to
instruction selection pattern matching when commuted variants are produced.
This patch scans the pattern's clauses and collects the variables, creating
a set of variables that are used more than once. TreePatternNode::isIsomorphicTo()
also understands that multiply-used variables are significant.

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

16 years agoevan implemented this.
Chris Lattner [Wed, 5 Mar 2008 17:11:51 +0000 (17:11 +0000)]
evan implemented this.

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

16 years agoFix test not to emit junk into source directory
Anton Korobeynikov [Wed, 5 Mar 2008 15:44:25 +0000 (15:44 +0000)]
Fix test not to emit junk into source directory

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

16 years agoTestcase for PR2054
Anton Korobeynikov [Wed, 5 Mar 2008 15:43:58 +0000 (15:43 +0000)]
Testcase for PR2054

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

16 years agoRemember the source->dest mapping when copying aliases. This fixes PR2054
Anton Korobeynikov [Wed, 5 Mar 2008 15:27:21 +0000 (15:27 +0000)]
Remember the source->dest mapping when copying aliases. This fixes PR2054

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

16 years agoClarify the state-of-the-art
Anton Korobeynikov [Wed, 5 Mar 2008 15:11:00 +0000 (15:11 +0000)]
Clarify the state-of-the-art

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

16 years agoUse AC_PATH_PROG correctly:
Bill Wendling [Wed, 5 Mar 2008 09:28:02 +0000 (09:28 +0000)]
Use AC_PATH_PROG correctly:

    http://www.gnu.org/software/autoconf/manual/autoconf.html#Generic-Programs

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

16 years agoisTwoAddress = 1 -> Constraints.
Evan Cheng [Wed, 5 Mar 2008 08:19:16 +0000 (08:19 +0000)]
isTwoAddress = 1 -> Constraints.

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

16 years agoPSLLWri etc. are two-address instructions.
Evan Cheng [Wed, 5 Mar 2008 08:11:27 +0000 (08:11 +0000)]
PSLLWri etc. are two-address instructions.

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

16 years agoadd a note
Chris Lattner [Wed, 5 Mar 2008 07:22:39 +0000 (07:22 +0000)]
add a note

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

16 years agoGeneralize FP constant shrinking optimization to apply to any vt
Chris Lattner [Wed, 5 Mar 2008 06:48:13 +0000 (06:48 +0000)]
Generalize FP constant shrinking optimization to apply to any vt
except ppc long double.  This allows us to shrink constant pool
entries for x86 long double constants, which in turn allows us to
use flds/fldl instead of fldt.

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

16 years agoImprove comment, pass in the original VT so that we can shrink a long double constant
Chris Lattner [Wed, 5 Mar 2008 06:46:58 +0000 (06:46 +0000)]
Improve comment, pass in the original VT so that we can shrink a long double constant
all the way to float, not stopping at double.

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

16 years agoIgnore debugging related instructions if they get this far.
Evan Cheng [Wed, 5 Mar 2008 02:34:36 +0000 (02:34 +0000)]
Ignore debugging related instructions if they get this far.

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

16 years agoRather than asserting. Dump out the MI that we are not able to encode and abort.
Evan Cheng [Wed, 5 Mar 2008 02:08:03 +0000 (02:08 +0000)]
Rather than asserting. Dump out the MI that we are not able to encode and abort.

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

16 years agoCodegen support for i128 UINT_TO_FP. This just fixes a
Dan Gohman [Wed, 5 Mar 2008 02:07:31 +0000 (02:07 +0000)]
Codegen support for i128 UINT_TO_FP. This just fixes a
bug in r47928 (Int64Ty is the correct type for the constant
pool entry here) and removes the asserts, now that the code
is capable of handling i128.

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

16 years agoAdd a target lowering hook to control whether it's worthwhile to compress fp constant.
Evan Cheng [Wed, 5 Mar 2008 01:30:59 +0000 (01:30 +0000)]
Add a target lowering hook to control whether it's worthwhile to compress fp constant.
For x86, if sse2 is available, it's not a good idea since cvtss2sd is slower than a movsd load and it prevents load folding. On x87, it's important to shrink fp constant since fldt is very expensive.

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