oota-llvm.git
14 years agolit: When running Tcl style tests on Windows, substitute slashes to avoid Tcl
Daniel Dunbar [Fri, 11 Jun 2010 23:27:45 +0000 (23:27 +0000)]
lit: When running Tcl style tests on Windows, substitute slashes to avoid Tcl
quoting problems. Not particularly ideal, but should work ok. Based on a patch by
Michael Spencer!

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

14 years agoAdd a missing bitcast. This code used to only handle conversions between
Bob Wilson [Fri, 11 Jun 2010 22:45:25 +0000 (22:45 +0000)]
Add a missing bitcast.  This code used to only handle conversions between
i64 and f64 types, but now it also handle Neon vector types, so the f64 result
of VMOVDRR may need to be converted to a Neon type.  Radar 8084742.

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

14 years agollvm-mc: Don't set NO_INSTALL on llvm-mc.
Daniel Dunbar [Fri, 11 Jun 2010 22:00:08 +0000 (22:00 +0000)]
llvm-mc: Don't set NO_INSTALL on llvm-mc.

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

14 years agoAdd instruction encoding for the Neon VMOV immediate instruction. This changes
Bob Wilson [Fri, 11 Jun 2010 21:34:50 +0000 (21:34 +0000)]
Add instruction encoding for the Neon VMOV immediate instruction.  This changes
the machine instruction representation of the immediate value to be encoded
into an integer with similar fields as the actual VMOV instruction.  This makes
things easier for the disassembler, since it can just stuff the bits into the
immediate operand, but harder for the asm printer since it has to decode the
value to be printed.  Testcase for the encoding will follow later when MC has
more support for ARM.

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

14 years agoSupport for nested functions/classes in debug output. (Again.) Radar 7424645.
Stuart Hastings [Fri, 11 Jun 2010 20:08:44 +0000 (20:08 +0000)]
Support for nested functions/classes in debug output.  (Again.)  Radar 7424645.

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

14 years agoDelete duplicate function.
Stuart Hastings [Fri, 11 Jun 2010 20:05:01 +0000 (20:05 +0000)]
Delete duplicate function.

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

14 years agoDefine ContextualFoldingSet, which stores a context parameter to pass down to
John McCall [Fri, 11 Jun 2010 11:06:44 +0000 (11:06 +0000)]
Define ContextualFoldingSet, which stores a context parameter to pass down to
the Profile method.  Currently this only works with the default FoldingSetTraits
implementation.

The point of this is to allow nodes to not store context values which are only
used during profiling.  A better solution would thread this value through the
folding algorithms, but then those would need to be (1) templated and
(2) non-opaque.

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

14 years agoAdd support for polynomial type, for polynomial multiply
Nate Begeman [Thu, 10 Jun 2010 18:06:07 +0000 (18:06 +0000)]
Add support for polynomial type, for polynomial multiply

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

14 years agoAvoid "variable 'bits' set but not used [-Wunused-but-set-variable]"
Duncan Sands [Thu, 10 Jun 2010 16:23:15 +0000 (16:23 +0000)]
Avoid "variable 'bits' set but not used [-Wunused-but-set-variable]"
warnings with gcc-4.6, by not setting bits when the result is not
used.

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

14 years agoAvoid many "variable 'Sub' set but not used [-Wunused-but-set-variable]" warnings
Duncan Sands [Thu, 10 Jun 2010 15:06:05 +0000 (15:06 +0000)]
Avoid many "variable 'Sub' set but not used [-Wunused-but-set-variable]" warnings
with gcc-4.6.  The warning is wrong, since Sub *is* used (perhaps gcc is confused
because the use of Sub is constant folded away?), but since it is trivial to avoid,
and massively reduces the amount of warning spew, just workaround the wrong warning.

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

14 years agoAdd includes to get ptrdiff_t. This is needed by gcc-4.6 which has
Duncan Sands [Thu, 10 Jun 2010 10:13:58 +0000 (10:13 +0000)]
Add includes to get ptrdiff_t.  This is needed by gcc-4.6 which has
done some more header trimming, resulting in cstdef being included
by less header files.

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

14 years agoTeach tablegen to allow "let" expressions inside multiclasses,
Bruno Cardoso Lopes [Thu, 10 Jun 2010 02:42:59 +0000 (02:42 +0000)]
Teach tablegen to allow "let" expressions inside multiclasses,
providing more ways to factor out commonality from the records.

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

14 years agoCode refactoring, no functionality changes.
Evan Cheng [Thu, 10 Jun 2010 02:09:31 +0000 (02:09 +0000)]
Code refactoring, no functionality changes.

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

14 years agoDelete code that's not safe.
Evan Cheng [Thu, 10 Jun 2010 02:08:20 +0000 (02:08 +0000)]
Delete code that's not safe.

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

14 years agoNEON support for _lane ops, and multiplies by scalar.
Nate Begeman [Thu, 10 Jun 2010 00:16:56 +0000 (00:16 +0000)]
NEON support for _lane ops, and multiplies by scalar.

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

14 years agobe slightly more subtle about skipping dbg_value instructions; otherwise, if a
Jim Grosbach [Wed, 9 Jun 2010 22:21:24 +0000 (22:21 +0000)]
be slightly more subtle about skipping dbg_value instructions; otherwise, if a
dbg_value immediately follows a sequence of ldr/str instructions that should
be combined into an ldm/stm and is the last instruction in the block, then
combine may end up being skipped.

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

14 years agoTestcase for r105741.
Bill Wendling [Wed, 9 Jun 2010 20:30:22 +0000 (20:30 +0000)]
Testcase for r105741.

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

14 years agoMark physregs defined by inline asm as implicit.
Jakob Stoklund Olesen [Wed, 9 Jun 2010 20:05:00 +0000 (20:05 +0000)]
Mark physregs defined by inline asm as implicit.

This is a bit of a hack to make inline asm look more like call instructions.
It would be better to produce correct dead flags during isel.

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

14 years agoAllow target to place 2-address pass inserted copies in better spots. Thumb2 will...
Evan Cheng [Wed, 9 Jun 2010 19:26:01 +0000 (19:26 +0000)]
Allow target to place 2-address pass inserted copies in better spots. Thumb2 will use this to try to avoid breaking up IT blocks.

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

14 years agoIt's an error to translate this:
Bill Wendling [Wed, 9 Jun 2010 19:00:55 +0000 (19:00 +0000)]
It's an error to translate this:

   %reg1025 = <sext> %reg1024
    ...
   %reg1026 = SUBREG_TO_REG 0, %reg1024, 4

into this:

   %reg1025 = <sext> %reg1024
    ...
   %reg1027 = EXTRACT_SUBREG %reg1025, 4
   %reg1026 = SUBREG_TO_REG 0, %reg1027, 4

The problem here is that SUBREG_TO_REG is there to assert that an implicit zext
occurs. It doesn't insert a zext instruction. If we allow the EXTRACT_SUBREG
here, it will give us the value after the <sext>, not the original value of
%reg1024 before <sext>.

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

14 years agoRevert 105540, 105542, 105544, 105546, and 105548 to unbreak bootstrapping.
Evan Cheng [Wed, 9 Jun 2010 18:59:43 +0000 (18:59 +0000)]
Revert 105540, 105542, 105544, 105546, and 105548 to unbreak bootstrapping.

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

14 years ago- Fix description of SUBREG_TO_REG. It's not going to generate a zext. But it
Bill Wendling [Wed, 9 Jun 2010 18:15:36 +0000 (18:15 +0000)]
- Fix description of SUBREG_TO_REG. It's not going to generate a zext. But it
  is used to assert that an *implicit* zext is performed.

- Fix grammar-o in INSERT_SUBREG. (required reformatting)

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

14 years agoFurther refine types for operations which take scalars.
Nate Begeman [Wed, 9 Jun 2010 18:02:26 +0000 (18:02 +0000)]
Further refine types for operations which take scalars.
This will be used primarily by NEON shift intrinsics.

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

14 years agoWorkaround SCEV non-determinism on this test, for now, to get buildbots back to
Daniel Dunbar [Wed, 9 Jun 2010 17:54:40 +0000 (17:54 +0000)]
Workaround SCEV non-determinism on this test, for now, to get buildbots back to
green. Dan, please revert this once the real problem is fixed.

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

14 years agoChange another reference to the "indirect callgraph node" to
Duncan Sands [Wed, 9 Jun 2010 17:39:05 +0000 (17:39 +0000)]
Change another reference to the "indirect callgraph node" to
refer to the "external node" instead.

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

14 years agoOutput "external node" rather than "Indirect CallGraph node" when printing
Duncan Sands [Wed, 9 Jun 2010 17:35:00 +0000 (17:35 +0000)]
Output "external node" rather than "Indirect CallGraph node" when printing
callgraph SCC's.  This makes it match what the node itself would print.  Also,
"indirect callgraph node" doesn't make sense - it has nothing particularly to
do with indirect calls.

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

14 years agoHow about ULL...
Eric Christopher [Wed, 9 Jun 2010 16:16:48 +0000 (16:16 +0000)]
How about ULL...

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

14 years agoPulled CodeMetrics out of InlineCost.h and made it a bit more general, so it can...
Kenneth Uildriks [Wed, 9 Jun 2010 15:11:37 +0000 (15:11 +0000)]
Pulled CodeMetrics out of InlineCost.h and made it a bit more general, so it can be reused from PartialSpecializationCost

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

14 years agoFix SPU to cope with vector insertelement to an undef position.
Kalle Raiskila [Wed, 9 Jun 2010 09:58:17 +0000 (09:58 +0000)]
Fix SPU to cope with vector insertelement to an undef position.
We default to inserting to lane 0.

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

14 years agoHandle loading from/storing to undef pointers on SPU by inserting a
Kalle Raiskila [Wed, 9 Jun 2010 08:29:41 +0000 (08:29 +0000)]
Handle loading from/storing to undef pointers on SPU by inserting a
random load/store, rather than crashing llc.

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

14 years agoSpecialize I-Class instructions better so that we have less work to do in codegen.
Nate Begeman [Wed, 9 Jun 2010 05:11:55 +0000 (05:11 +0000)]
Specialize I-Class instructions better so that we have less work to do in codegen.
Parenthesize macro args

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

14 years agoTypo.
Evan Cheng [Wed, 9 Jun 2010 03:49:12 +0000 (03:49 +0000)]
Typo.

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

14 years agoFix a gcc warning:
Rafael Espindola [Wed, 9 Jun 2010 03:00:05 +0000 (03:00 +0000)]
Fix a gcc warning:

'class llvm::DAGDeltaAlgorithm' has virtual functions and accessible non-virtual destructor

Not sure if this is the best solution, but this class has state and some of the
classes that inherit from it also do, so it looks appropriate.

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

14 years agoA few new x86-64 specific README entries.
Eli Friedman [Wed, 9 Jun 2010 02:43:17 +0000 (02:43 +0000)]
A few new x86-64 specific README entries.

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

14 years agoThumb2 IT blocks are fairly expensive. When there are multiple selects using
Evan Cheng [Wed, 9 Jun 2010 01:46:50 +0000 (01:46 +0000)]
Thumb2 IT blocks are fairly expensive. When there are multiple selects using
the same condition, it's important to make sure they are scheduled together
to avoid forming multiple IT blocks. I'm adding a pre-regalloc pass that forms
IT blocks early (by re-scheduling instructions and split basic blocks) to
attempt to fix this. This is not turned on by default since I am not sure this
is the right fix.

Another issue is llvm selects are modeled as two-address conditional moves.
This can be very bad when the copies before the conditional moves are not
coalesced away. Teach IT formation pass to move the copies above the IT block
(when legal) to avoid breaking the IT block.

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

14 years agoHandle instructions which need to be #defines for the purpose of capturing constant...
Nate Begeman [Wed, 9 Jun 2010 01:09:00 +0000 (01:09 +0000)]
Handle instructions which need to be #defines for the purpose of capturing constant arguments
Handle extract hi/lo with common code

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

14 years agoAdd argument name comments.
Jakob Stoklund Olesen [Wed, 9 Jun 2010 00:40:31 +0000 (00:40 +0000)]
Add argument name comments.

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

14 years agoIncremental improvement to the handling of the x86 "Jump if rCX Zero"
Kevin Enderby [Tue, 8 Jun 2010 23:48:44 +0000 (23:48 +0000)]
Incremental improvement to the handling of the x86 "Jump if rCX Zero"
instruction.  Added the 64-bit version "jrcxz" so it is recognized and also
added the checks for incorrect uses of "jcxz" in 64-bit mode and "jrcxz" in
32-bit mode.  Still to do is to correctly handle the encoding of the
instruction adding the Address-size override prefix byte, 0x67, when the width
of the count register is not the same as the mode the machine is running in.
Which for example means the encoding of "jecxz" depends if you are assembling
as a 32-bit target or a 64-bit target.

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

14 years agoSplit out these asserts so it's more apparent why we're not assembling
Eric Christopher [Tue, 8 Jun 2010 22:57:33 +0000 (22:57 +0000)]
Split out these asserts so it's more apparent why we're not assembling
that rip-relative address when executing in 32-bit mode.

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

14 years agofix copy/paste/modify think-o
Jim Grosbach [Tue, 8 Jun 2010 22:53:32 +0000 (22:53 +0000)]
fix copy/paste/modify think-o

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

14 years agoReapply r105521, this time appending "LLU" to 64 bit
Bruno Cardoso Lopes [Tue, 8 Jun 2010 22:51:23 +0000 (22:51 +0000)]
Reapply r105521, this time appending "LLU" to 64 bit
immediates to avoid breaking the build.

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

14 years agoEnsure that mov and not lea are used to stick the address into
Eric Christopher [Tue, 8 Jun 2010 22:04:25 +0000 (22:04 +0000)]
Ensure that mov and not lea are used to stick the address into
the register.  While we're at it, make sure it's in the right one.

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

14 years agoMakefiles: Teach LLVM's recursive makefile descent to update objdir Makefiles if
Daniel Dunbar [Tue, 8 Jun 2010 20:10:13 +0000 (20:10 +0000)]
Makefiles: Teach LLVM's recursive makefile descent to update objdir Makefiles if
they are out of date, instead of only testing if they exist.

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

14 years agofix typo
Jim Grosbach [Tue, 8 Jun 2010 20:06:55 +0000 (20:06 +0000)]
fix typo

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

14 years agoUse const_iterator where appropriate.
Daniel Dunbar [Tue, 8 Jun 2010 17:21:57 +0000 (17:21 +0000)]
Use const_iterator where appropriate.

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

14 years agoDeltaAlgorithm: Tweak split to split by first/second half instead of even/odd, since...
Daniel Dunbar [Tue, 8 Jun 2010 16:21:26 +0000 (16:21 +0000)]
DeltaAlgorithm: Tweak split to split by first/second half instead of even/odd, since adjacent changes are more likely to be related.

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

14 years agoADT: Add DAGDeltaAlgorithm, which is a DAG minimization algorithm built on top of...
Daniel Dunbar [Tue, 8 Jun 2010 16:21:22 +0000 (16:21 +0000)]
ADT: Add DAGDeltaAlgorithm, which is a DAG minimization algorithm built on top of the standard 'delta debugging' algorithm.
 - This can give substantial speedups in the delta process for inputs we can construct dependency information for.

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

14 years agoAdd more virtual memory to lit. The python in x86-64 fedora 13 needs it to run
Rafael Espindola [Tue, 8 Jun 2010 16:17:58 +0000 (16:17 +0000)]
Add more virtual memory to lit. The python in x86-64 fedora 13 needs it to run
the llvm tests :-(
It was failing with

-- Testing: 5324 tests, 8 threads --
Fatal Python error: PyEval_AcquireThread: NULL new thread state

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

14 years agoUse realloc instead of malloc+memcpy when growing a POD SmallVector. A smart
Benjamin Kramer [Tue, 8 Jun 2010 11:44:30 +0000 (11:44 +0000)]
Use realloc instead of malloc+memcpy when growing a POD SmallVector. A smart
realloc implementation can try to expand the allocated memory block in-place,
avoiding the copy.

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

14 years agoFlag SPU's function call sequence together.
Kalle Raiskila [Tue, 8 Jun 2010 07:55:16 +0000 (07:55 +0000)]
Flag SPU's function call sequence together.
Discussed here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-June/032107.html

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

14 years agoFix a valgrind error.
Nate Begeman [Tue, 8 Jun 2010 07:11:17 +0000 (07:11 +0000)]
Fix a valgrind error.

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

14 years agoRefine BuiltinsARM.def types a bit, we should do a better job of this to save some...
Nate Begeman [Tue, 8 Jun 2010 06:01:16 +0000 (06:01 +0000)]
Refine BuiltinsARM.def types a bit, we should do a better job of this to save some c++ code in CGBuiltins.

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

14 years agoFix up a comment.
Bob Wilson [Tue, 8 Jun 2010 00:42:08 +0000 (00:42 +0000)]
Fix up a comment.

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

14 years agoARM NEON:
Nate Begeman [Tue, 8 Jun 2010 00:14:42 +0000 (00:14 +0000)]
ARM NEON:
fix vcvt naming
handle vdup, vcombine with generic vector code

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

14 years agoFurther changes for Neon vector shuffles:
Bob Wilson [Mon, 7 Jun 2010 23:53:38 +0000 (23:53 +0000)]
Further changes for Neon vector shuffles:
- change isShuffleMaskLegal to show that all shuffles with 32-bit and 64-bit
  elements are legal
- the Neon shuffle instructions do not support 64-bit elements, but we were
  not checking for that before lowering shuffles to use them
- remove some 64-bit element vduplane patterns that are no longer needed

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

14 years agoFix a mistake in my previous change r105437: don't access operand 2 and assume
Bob Wilson [Mon, 7 Jun 2010 23:48:46 +0000 (23:48 +0000)]
Fix a mistake in my previous change r105437: don't access operand 2 and assume
that it is an immediate before checking that the instruction is an
EXTRACT_SUBREG.

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

14 years agoAdd an svn:ignore.
Dan Gohman [Mon, 7 Jun 2010 23:15:15 +0000 (23:15 +0000)]
Add an svn:ignore.

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

14 years agoAdd some basic debug output.
Dan Gohman [Mon, 7 Jun 2010 22:32:10 +0000 (22:32 +0000)]
Add some basic debug output.

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

14 years agoTweak test for debug/metadata change, update to FileCheck. Radar 7424645.
Stuart Hastings [Mon, 7 Jun 2010 21:50:54 +0000 (21:50 +0000)]
Tweak test for debug/metadata change, update to FileCheck.  Radar 7424645.

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

14 years agoHandle dbg_value instructions (i.e., skip them) when generating IT blocks.
Jim Grosbach [Mon, 7 Jun 2010 21:48:47 +0000 (21:48 +0000)]
Handle dbg_value instructions (i.e., skip them) when generating IT blocks.
rdar://7797940

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

14 years agoPlug a leak in the non-error case by removing one level of indirection.
Nick Lewycky [Mon, 7 Jun 2010 21:42:19 +0000 (21:42 +0000)]
Plug a leak in the non-error case by removing one level of indirection.

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

14 years agoCleanup. Process the dbg_values separately
Jim Grosbach [Mon, 7 Jun 2010 21:28:55 +0000 (21:28 +0000)]
Cleanup. Process the dbg_values separately

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

14 years agoFix this test to work under lit.
Dan Gohman [Mon, 7 Jun 2010 20:58:11 +0000 (20:58 +0000)]
Fix this test to work under lit.

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

14 years agoRun dead type elimination after dead argument elimination.
Dan Gohman [Mon, 7 Jun 2010 20:28:37 +0000 (20:28 +0000)]
Run dead type elimination after dead argument elimination.

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

14 years agoMake bugpoint dead-argument-hacking actually work, and actually test it.
Dan Gohman [Mon, 7 Jun 2010 20:20:33 +0000 (20:20 +0000)]
Make bugpoint dead-argument-hacking actually work, and actually test it.

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

14 years agoUse ->isVoidTy().
Dan Gohman [Mon, 7 Jun 2010 20:19:26 +0000 (20:19 +0000)]
Use ->isVoidTy().

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

14 years agoThe FoldingSet hash data includes pointer values, so it isn't
Dan Gohman [Mon, 7 Jun 2010 19:36:14 +0000 (19:36 +0000)]
The FoldingSet hash data includes pointer values, so it isn't
determinstic. Instead, give SCEV objects an arbitrary sequence
number.

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

14 years agoOptimize this code somewhat by taking advantage of the fact
Dan Gohman [Mon, 7 Jun 2010 19:20:57 +0000 (19:20 +0000)]
Optimize this code somewhat by taking advantage of the fact
that the operands are sorted.

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

14 years agoAnother place where the code wanted to access the argument list and not all of
Bill Wendling [Mon, 7 Jun 2010 19:18:58 +0000 (19:18 +0000)]
Another place where the code wanted to access the argument list and not all of
the operands.

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

14 years agoMicro-optimize this, to speed up this hotspot in debug builds a little.
Dan Gohman [Mon, 7 Jun 2010 19:16:37 +0000 (19:16 +0000)]
Micro-optimize this, to speed up this hotspot in debug builds a little.

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

14 years agoMicro-optimize this.
Dan Gohman [Mon, 7 Jun 2010 19:12:54 +0000 (19:12 +0000)]
Micro-optimize this.

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

14 years agoMove exit check where it really belongs.
Jim Grosbach [Mon, 7 Jun 2010 19:12:21 +0000 (19:12 +0000)]
Move exit check where it really belongs.

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

14 years agoOptimize ScalarEvolution's SCEVComplexityCompare predicate: don't go
Dan Gohman [Mon, 7 Jun 2010 19:06:13 +0000 (19:06 +0000)]
Optimize ScalarEvolution's SCEVComplexityCompare predicate: don't go
scrounging through SCEVUnknown contents and SCEVNAryExpr operands;
instead just do a simple deterministic comparison of the precomputed
hash data.

Also, since this is more precise, it eliminates the need for the slow
N^2 duplicate detection code.

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

14 years agoCreate new accessors to get arguments for call/invoke instructions. It breaks
Bill Wendling [Mon, 7 Jun 2010 19:05:06 +0000 (19:05 +0000)]
Create new accessors to get arguments for call/invoke instructions. It breaks
encapsulation to force the users of these classes to know about the internal
data structure of the Operands structure. It also can lead to errors, like in
the MSIL writer.

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

14 years agoMisc cleanups to the gold plugin.
Rafael Espindola [Mon, 7 Jun 2010 16:45:22 +0000 (16:45 +0000)]
Misc cleanups to the gold plugin.

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

14 years agoclang codegen support
Nate Begeman [Mon, 7 Jun 2010 16:00:37 +0000 (16:00 +0000)]
clang codegen support

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

14 years agoPartial specialization was not checking the callsite to make sure it was using the...
Kenneth Uildriks [Sat, 5 Jun 2010 14:50:21 +0000 (14:50 +0000)]
Partial specialization was not checking the callsite to make sure it was using the same constants as the specialization, leading to calls to the wrong specialization.  Patch by Takumi Nakamura\!

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

14 years agoThis bug is also present in MSVC10. Requested by Elrood on IRC.
Duncan Sands [Sat, 5 Jun 2010 12:40:43 +0000 (12:40 +0000)]
This bug is also present in MSVC10.  Requested by Elrood on IRC.

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

14 years agorevert r105521, which is breaking the buildbots with stuff like this:
Chris Lattner [Sat, 5 Jun 2010 04:17:30 +0000 (04:17 +0000)]
revert r105521, which is breaking the buildbots with stuff like this:

In file included from X86InstrInfo.cpp:16:
X86GenInstrInfo.inc:2789: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2790: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2792: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2793: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2808: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2809: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2816: error: integer constant is too large for 'long' type
X86GenInstrInfo.inc:2817: error: integer constant is too large for 'long' type

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

14 years agoInitial AVX support for some instructions. No patterns matched
Bruno Cardoso Lopes [Sat, 5 Jun 2010 03:53:24 +0000 (03:53 +0000)]
Initial AVX support for some instructions. No patterns matched
yet, only assembly encoding support.

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

14 years agoTeach tablegen to support 'defm' inside multiclasses.
Bruno Cardoso Lopes [Sat, 5 Jun 2010 02:11:52 +0000 (02:11 +0000)]
Teach tablegen to support 'defm' inside multiclasses.

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

14 years agoMake MachineFunctionPass::createPrinterPass private, as no subclasses
Dan Gohman [Sat, 5 Jun 2010 01:19:12 +0000 (01:19 +0000)]
Make MachineFunctionPass::createPrinterPass private, as no subclasses
should be calling it.

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

14 years agoImprovements to tail call code. No functional effect
Dale Johannesen [Sat, 5 Jun 2010 00:51:39 +0000 (00:51 +0000)]
Improvements to tail call code.  No functional effect
unless using -arm-tail-calls.

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

14 years agogetFoldedOffsetOf no longer does anything special with vector types.
Dan Gohman [Sat, 5 Jun 2010 00:47:34 +0000 (00:47 +0000)]
getFoldedOffsetOf no longer does anything special with vector types.

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

14 years agoNo need to special-case structs here; structs are first-class now.
Dan Gohman [Sat, 5 Jun 2010 00:42:29 +0000 (00:42 +0000)]
No need to special-case structs here; structs are first-class now.

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

14 years agoRevert 105492 & 105493 due to a testcase regression. Radar 7424645.
Stuart Hastings [Sat, 5 Jun 2010 00:39:29 +0000 (00:39 +0000)]
Revert 105492 & 105493 due to a testcase regression.  Radar 7424645.

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

14 years agoLSR needs to remember inserted instructions even in postinc mode, because
Dan Gohman [Sat, 5 Jun 2010 00:33:07 +0000 (00:33 +0000)]
LSR needs to remember inserted instructions even in postinc mode, because
there could be multiple subexpressions within a single expansion which
require insert point adjustment. This fixes PR7306.

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

14 years agoFix some liveout handling related to tail calls, see comments.
Dale Johannesen [Sat, 5 Jun 2010 00:30:45 +0000 (00:30 +0000)]
Fix some liveout handling related to tail calls, see comments.
I don't think this ever resulted in problems on x86, but it
would on ARM.

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

14 years agoImplement operator== and operator!= for SetVector.
Dan Gohman [Sat, 5 Jun 2010 00:26:02 +0000 (00:26 +0000)]
Implement operator== and operator!= for SetVector.

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

14 years agotest case for r105504.
Devang Patel [Fri, 4 Jun 2010 23:47:41 +0000 (23:47 +0000)]
test case for r105504.
Radar 8055687.

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

14 years agoRe-apply 105308 with fix.
Evan Cheng [Fri, 4 Jun 2010 23:28:13 +0000 (23:28 +0000)]
Re-apply 105308 with fix.

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

14 years agoDon't track users of undef values; they aren't interesting for
Dan Gohman [Fri, 4 Jun 2010 23:16:05 +0000 (23:16 +0000)]
Don't track users of undef values; they aren't interesting for
register pressure.

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

14 years agoMake if-conversion ignore dbg_value instructions in its analysis. rdar://7797940
Jim Grosbach [Fri, 4 Jun 2010 23:01:26 +0000 (23:01 +0000)]
Make if-conversion ignore dbg_value instructions in its analysis. rdar://7797940

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

14 years agoHandle multi-vector returns and args.
Nate Begeman [Fri, 4 Jun 2010 22:53:30 +0000 (22:53 +0000)]
Handle multi-vector returns and args.

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

14 years agoUpdate docs to reflect new DISubprogram elements.
Devang Patel [Fri, 4 Jun 2010 22:49:55 +0000 (22:49 +0000)]
Update docs to reflect new DISubprogram elements.

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

14 years agoSupport for nested functions/classes in debug output. Radar 7424645.
Stuart Hastings [Fri, 4 Jun 2010 22:36:03 +0000 (22:36 +0000)]
Support for nested functions/classes in debug output.  Radar 7424645.

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

14 years agoCopy location info for current function argument from dbg.declare if respective store...
Devang Patel [Fri, 4 Jun 2010 22:27:30 +0000 (22:27 +0000)]
Copy location info for current function argument from dbg.declare if respective store instruction does not have any location info.

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

14 years agoAdditional fixes to BuiltinsARM.def generator, on to clang codegen.
Nate Begeman [Fri, 4 Jun 2010 21:36:00 +0000 (21:36 +0000)]
Additional fixes to BuiltinsARM.def generator, on to clang codegen.

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

14 years agoMore tail call removal.
Dale Johannesen [Fri, 4 Jun 2010 21:14:24 +0000 (21:14 +0000)]
More tail call removal.

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

14 years agoSkip dbg_value instructions when scanning instructions in register scavenging.
Jim Grosbach [Fri, 4 Jun 2010 20:18:30 +0000 (20:18 +0000)]
Skip dbg_value instructions when scanning instructions in register scavenging.

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