oota-llvm.git
13 years agoUpdate to 2.9 post-2.8 branch.
Eric Christopher [Mon, 6 Sep 2010 18:47:00 +0000 (18:47 +0000)]
Update to 2.9 post-2.8 branch.

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

13 years agoRedefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.
Roman Divacky [Mon, 6 Sep 2010 18:43:14 +0000 (18:43 +0000)]
Redefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.

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

13 years agorandom cleanups
Chris Lattner [Mon, 6 Sep 2010 18:32:06 +0000 (18:32 +0000)]
random cleanups

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

13 years agoMCELF: Align symtab, relocation sections and section headers properly. Patch by Krist...
Benjamin Kramer [Mon, 6 Sep 2010 16:11:52 +0000 (16:11 +0000)]
MCELF: Align symtab, relocation sections and section headers properly. Patch by Krister Wombell.

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

13 years agocompute the HasSSE3 bit correctly, patch by Nikolai Saoukh.
Chris Lattner [Mon, 6 Sep 2010 05:19:44 +0000 (05:19 +0000)]
compute the HasSSE3 bit correctly, patch by Nikolai Saoukh.

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

13 years agofix PR8067, an over-aggressive assertion in LICM.
Chris Lattner [Mon, 6 Sep 2010 05:11:24 +0000 (05:11 +0000)]
fix PR8067, an over-aggressive assertion in LICM.

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

13 years agoemit the LLVM intrinsic name -> intrinsic number mapping table with
Chris Lattner [Mon, 6 Sep 2010 03:58:45 +0000 (03:58 +0000)]
emit the LLVM intrinsic name -> intrinsic number mapping table with
StringMatcher instead of a linear sequence of memcmps.

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

13 years agocleanup some of the lifetime/invariant marker stuff, add a big fixme.
Chris Lattner [Mon, 6 Sep 2010 03:58:04 +0000 (03:58 +0000)]
cleanup some of the lifetime/invariant marker stuff, add a big fixme.

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

13 years agoallow specifying an indentation level for the string matcher.
Chris Lattner [Mon, 6 Sep 2010 03:50:59 +0000 (03:50 +0000)]
allow specifying an indentation level for the string matcher.

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

13 years agoemit the __builtin -> intrinsic map with StringMatcher instead of a
Chris Lattner [Mon, 6 Sep 2010 03:14:45 +0000 (03:14 +0000)]
emit the __builtin -> intrinsic map with StringMatcher instead of a
copy of a close relative of it.

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

13 years agosame bug, another place.
Chris Lattner [Mon, 6 Sep 2010 03:12:27 +0000 (03:12 +0000)]
same bug, another place.

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

13 years agofix a critical bug where the generated table would say
Chris Lattner [Mon, 6 Sep 2010 03:11:10 +0000 (03:11 +0000)]
fix a critical bug where the generated table would say
"1 strings to match" in a comment, which isn't gramatic.

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

13 years agoupdate cmake
Chris Lattner [Mon, 6 Sep 2010 02:58:25 +0000 (02:58 +0000)]
update cmake

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

13 years agofactor the snazzy string matcher code that Daniel hates
Chris Lattner [Mon, 6 Sep 2010 02:01:51 +0000 (02:01 +0000)]
factor the snazzy string matcher code that Daniel hates
out of AsmMatcherEmitter.cpp into its own class.

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

13 years agoslightly improve the runtime and code size of the Intrinsics info table by not
Chris Lattner [Mon, 6 Sep 2010 01:44:44 +0000 (01:44 +0000)]
slightly improve the runtime and code size of the Intrinsics info table by not
comparing the "llvm." prefix in the memcmp, and not storing it in the string literal.

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

13 years agospeed up -gvn 3.4% on the testcase in PR7023
Chris Lattner [Mon, 6 Sep 2010 01:26:29 +0000 (01:26 +0000)]
speed up -gvn 3.4% on the testcase in PR7023

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

13 years agoTeach loop rotate to hoist trivially invariant instructions
Chris Lattner [Mon, 6 Sep 2010 01:10:22 +0000 (01:10 +0000)]
Teach loop rotate to hoist trivially invariant instructions
in the duplicated block instead of duplicating them.

Duplicating them into the end of the loop and the preheader
means that we got a phi node in the header of the loop,
which prevented LICM from hoisting them.  GVN would
usually come around later and merge the duplicated
instructions so we'd get reasonable output... except that
anything dependent on the shoulda-been-hoisted value can't
be hoisted.  In PR5319 (which this fixes), a memory value
didn't get promoted.

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

13 years agopull a simple method out of LICM into a new
Chris Lattner [Mon, 6 Sep 2010 01:05:37 +0000 (01:05 +0000)]
pull a simple method out of LICM into a new
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.

No functionality change.

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

13 years agofit in 80 columns and don't crash on exit, fixes PR8080
Chris Lattner [Sun, 5 Sep 2010 23:09:30 +0000 (23:09 +0000)]
fit in 80 columns and don't crash on exit, fixes PR8080

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

13 years agoremove some dead code. t2addrmode_imm8s4 is never used in a
Chris Lattner [Sun, 5 Sep 2010 22:51:11 +0000 (22:51 +0000)]
remove some dead code.  t2addrmode_imm8s4 is never used in a
pattern, so there is no need to define a matching function.

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

13 years agofix inconsistent formatting.
Chris Lattner [Sun, 5 Sep 2010 22:43:56 +0000 (22:43 +0000)]
fix inconsistent formatting.

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

13 years agocleanups: mark stuff static, only tagdecls should be in anon namespaces.
Chris Lattner [Sun, 5 Sep 2010 21:25:43 +0000 (21:25 +0000)]
cleanups: mark stuff static, only tagdecls should be in anon namespaces.

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

13 years agocleanups.
Chris Lattner [Sun, 5 Sep 2010 21:18:45 +0000 (21:18 +0000)]
cleanups.

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

13 years agosome random notes.
Chris Lattner [Sun, 5 Sep 2010 20:49:45 +0000 (20:49 +0000)]
some random notes.

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

13 years agoadd a comment about where this should eventually move.
Chris Lattner [Sun, 5 Sep 2010 20:33:40 +0000 (20:33 +0000)]
add a comment about where this should eventually move.

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

13 years agoupdate this.
Chris Lattner [Sun, 5 Sep 2010 20:22:09 +0000 (20:22 +0000)]
update this.

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

13 years agomore cleanups
Chris Lattner [Sun, 5 Sep 2010 20:13:07 +0000 (20:13 +0000)]
more cleanups

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

13 years agoChange lower atomic pass to use IntrinsicInst to simplify it a bit.
Chris Lattner [Sun, 5 Sep 2010 20:10:47 +0000 (20:10 +0000)]
Change lower atomic pass to use IntrinsicInst to simplify it a bit.

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

13 years agoeliminate some non-obvious casts. UndefValue isa Constant.
Chris Lattner [Sun, 5 Sep 2010 20:03:09 +0000 (20:03 +0000)]
eliminate some non-obvious casts.  UndefValue isa Constant.

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

13 years agofix PR8063, a crash in globalopt in the malloc analysis code.
Chris Lattner [Sun, 5 Sep 2010 17:20:46 +0000 (17:20 +0000)]
fix PR8063, a crash in globalopt in the malloc analysis code.

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

13 years agoAdded initialisers for reduction rule counters.
Lang Hames [Sun, 5 Sep 2010 13:42:32 +0000 (13:42 +0000)]
Added initialisers for reduction rule counters.

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

13 years agoFix warning reported by MSVC++ builder.
Nick Lewycky [Sun, 5 Sep 2010 09:11:38 +0000 (09:11 +0000)]
Fix warning reported by MSVC++ builder.

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

13 years agoSwitch FnSet to containing the ComparableFunction instead of a pointer to one.
Nick Lewycky [Sun, 5 Sep 2010 09:00:32 +0000 (09:00 +0000)]
Switch FnSet to containing the ComparableFunction instead of a pointer to one.
This reduces malloc traffic (yay!) and removes MergeFunctionsEqualityInfo.

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

13 years agoFix many bugs when merging weak-strong and weak-weak pairs. We now merge all
Nick Lewycky [Sun, 5 Sep 2010 08:22:49 +0000 (08:22 +0000)]
Fix many bugs when merging weak-strong and weak-weak pairs. We now merge all
strong functions first to make sure they're the canonical definitions and then
do a second pass looking only for weak functions.

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

13 years agoimplement rdar://6653118 - fastisel should fold loads where possible.
Chris Lattner [Sun, 5 Sep 2010 02:18:34 +0000 (02:18 +0000)]
implement rdar://6653118 - fastisel should fold loads where possible.

Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:

int foo(int x, int y, int z) {
  return x+y+z;
}

used to compile into:

_foo:                                   ## @foo
subq $12, %rsp
movl %edi, 8(%rsp)
movl %esi, 4(%rsp)
movl %edx, (%rsp)
movl 8(%rsp), %edx
movl 4(%rsp), %esi
addl %edx, %esi
movl (%rsp), %edx
addl %esi, %edx
movl %edx, %eax
addq $12, %rsp
ret

Now we produce:

_foo:                                   ## @foo
subq $12, %rsp
movl %edi, 8(%rsp)
movl %esi, 4(%rsp)
movl %edx, (%rsp)
movl 8(%rsp), %edx
addl 4(%rsp), %edx    ## Folded load
addl (%rsp), %edx     ## Folded load
movl %edx, %eax
addq $12, %rsp
ret

Fewer instructions and less register use = faster compiles.

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

13 years agoRemove dead code.
Jakob Stoklund Olesen [Sat, 4 Sep 2010 21:09:33 +0000 (21:09 +0000)]
Remove dead code.

Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.

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

13 years agofix this to work with allocators that have reference type with compilers
Chris Lattner [Sat, 4 Sep 2010 18:45:02 +0000 (18:45 +0000)]
fix this to work with allocators that have reference type with compilers
that diagnose invalid references to references.

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

13 years agodead method.
Chris Lattner [Sat, 4 Sep 2010 18:19:16 +0000 (18:19 +0000)]
dead method.

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

13 years agodelete dead code.
Chris Lattner [Sat, 4 Sep 2010 18:17:16 +0000 (18:17 +0000)]
delete dead code.

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

13 years agozap dead code.
Chris Lattner [Sat, 4 Sep 2010 18:12:00 +0000 (18:12 +0000)]
zap dead code.

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

13 years agoremove dead code, mblaze uses SelectAddrRegImm/SelectAddrRegReg,
Chris Lattner [Sat, 4 Sep 2010 18:02:47 +0000 (18:02 +0000)]
remove dead code, mblaze uses SelectAddrRegImm/SelectAddrRegReg,
not SelectAddr

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

13 years agozap dead code.
Chris Lattner [Sat, 4 Sep 2010 17:45:58 +0000 (17:45 +0000)]
zap dead code.

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

13 years agoRemove the last bit of isShuffleMaskLegal checks and improve the comment regarding...
Bruno Cardoso Lopes [Sat, 4 Sep 2010 02:58:56 +0000 (02:58 +0000)]
Remove the last bit of isShuffleMaskLegal checks and improve the comment regarding mmx shuffles

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

13 years agomake explicit that we not handle several mmx shuffles
Bruno Cardoso Lopes [Sat, 4 Sep 2010 02:50:13 +0000 (02:50 +0000)]
make explicit that we not handle several mmx shuffles

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

13 years agoFix LoopSimplify to notify ScalarEvolution when splitting a loop backedge
Dan Gohman [Sat, 4 Sep 2010 02:42:48 +0000 (02:42 +0000)]
Fix LoopSimplify to notify ScalarEvolution when splitting a loop backedge
into an inner loop, as the new loop iteration may differ substantially.
This fixes PR8078.

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

13 years agoEmit target specific nodes to handle palignr. Do not touch it for MMX versions yet.
Bruno Cardoso Lopes [Sat, 4 Sep 2010 02:36:07 +0000 (02:36 +0000)]
Emit target specific nodes to handle palignr. Do not touch it for MMX versions yet.

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

13 years agoEmit target specific nodes to handle splats starting at zero indicies
Bruno Cardoso Lopes [Sat, 4 Sep 2010 02:02:14 +0000 (02:02 +0000)]
Emit target specific nodes to handle splats starting at zero indicies

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

13 years agoEmit target specific nodes for isPSHUFHWMask and isPSHUFLWMask
Bruno Cardoso Lopes [Sat, 4 Sep 2010 01:36:45 +0000 (01:36 +0000)]
Emit target specific nodes for isPSHUFHWMask and isPSHUFLWMask

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

13 years agoEmit target specific nodes for isSHUFPMask
Bruno Cardoso Lopes [Sat, 4 Sep 2010 01:22:57 +0000 (01:22 +0000)]
Emit target specific nodes for isSHUFPMask

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

13 years agoPrevious isMOVLMask matching already emits targets nodes, remove check
Bruno Cardoso Lopes [Sat, 4 Sep 2010 00:50:08 +0000 (00:50 +0000)]
Previous isMOVLMask matching already emits targets nodes, remove check

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

13 years agoOne more check from the original isShuffleMaskLegal goes away
Bruno Cardoso Lopes [Sat, 4 Sep 2010 00:46:16 +0000 (00:46 +0000)]
One more check from the original isShuffleMaskLegal goes away

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

13 years agoRemove a duplicated but useless check that i've inserted in the previous commit.
Bruno Cardoso Lopes [Sat, 4 Sep 2010 00:43:12 +0000 (00:43 +0000)]
Remove a duplicated but useless check that i've inserted in the previous commit.

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

13 years agoRefactor some code and remove the extra checks for unpckl_undef and unpckh_undef
Bruno Cardoso Lopes [Sat, 4 Sep 2010 00:39:43 +0000 (00:39 +0000)]
Refactor some code and remove the extra checks for unpckl_undef and unpckh_undef

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

13 years agofix a bug in my licm rewrite when a load from the promoted memory
Chris Lattner [Sat, 4 Sep 2010 00:12:30 +0000 (00:12 +0000)]
fix a bug in my licm rewrite when a load from the promoted memory
location is being re-stored to the memory location.  We would get
a dangling pointer from the SSAUpdate data structure and miss a
use.  This fixes PR8068

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

13 years agoRemove check for unpckh mask
Bruno Cardoso Lopes [Fri, 3 Sep 2010 23:32:47 +0000 (23:32 +0000)]
Remove check for unpckh mask

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

13 years agoRemove check for unpckl mask
Bruno Cardoso Lopes [Fri, 3 Sep 2010 23:31:50 +0000 (23:31 +0000)]
Remove check for unpckl mask

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

13 years agoInline isShuffleMaskLegal into LowerVECTOR_SHUFFLE, so we can start
Bruno Cardoso Lopes [Fri, 3 Sep 2010 23:24:06 +0000 (23:24 +0000)]
Inline isShuffleMaskLegal into LowerVECTOR_SHUFFLE, so we can start
checking each standalone condition and decide whether emit target
specific nodes or remove the condition if it's already matched before.

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

13 years agoPropagate non-local comparisons. Fixes PR1757.
Owen Anderson [Fri, 3 Sep 2010 22:47:08 +0000 (22:47 +0000)]
Propagate non-local comparisons.  Fixes PR1757.

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

13 years agoReapply this increase to the number of virtual registers. All of the
Eric Christopher [Fri, 3 Sep 2010 22:46:31 +0000 (22:46 +0000)]
Reapply this increase to the number of virtual registers. All of the
various breakages appear to be dealt with.

Patch by Pekka Jääskeläinen.

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

13 years agoDisable the asserts that check that normalization is perfectly
Dan Gohman [Fri, 3 Sep 2010 22:12:56 +0000 (22:12 +0000)]
Disable the asserts that check that normalization is perfectly
invertible. ScalarEvolution's folding routines don't always succeed
in canonicalizing equal expressions to a single canonical form, and
this can cause these asserts to fail, even though there's no actual
correctness problem. This fixes PR8066.

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

13 years agoReapply considered harmfull part of rr112934 and r112942.
Bruno Cardoso Lopes [Fri, 3 Sep 2010 22:09:41 +0000 (22:09 +0000)]
Reapply considered harmfull part of rr112934 and r112942.
"Use target specific nodes instead of relying in unpckl and
unpckh pattern fragments during isel time. Also place a
depth limit in getShuffleScalarElt.

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

13 years agoprevious patch was a little too tricky for its own good. Don't try to
Jim Grosbach [Fri, 3 Sep 2010 21:45:15 +0000 (21:45 +0000)]
previous patch was a little too tricky for its own good. Don't try to
overload UserInInstr. Explicitly check Allocatable. The early exit in the
condition will mean the performance impact of the extra test should be
minimal.

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

13 years agoRemove the rest of the nonexistent 64-bit AVX instructions.
Dale Johannesen [Fri, 3 Sep 2010 21:23:00 +0000 (21:23 +0000)]
Remove the rest of the nonexistent 64-bit AVX instructions.
Bruno, please review.

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

13 years agoGeneralize getFieldType to work on all TypedInits. Add a couple of testcases from
David Greene [Fri, 3 Sep 2010 21:00:49 +0000 (21:00 +0000)]
Generalize getFieldType to work on all TypedInits.  Add a couple of testcases from
Amaury Pouly.

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

13 years agoReapply last harmless part of r112934, the pattern fragment to match X86Unpcklpd
Bruno Cardoso Lopes [Fri, 3 Sep 2010 20:44:26 +0000 (20:44 +0000)]
Reapply last harmless part of r112934, the pattern fragment to match X86Unpcklpd

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

13 years agoReintroduce a simple function refactoring done in r112934, also without any functiona...
Bruno Cardoso Lopes [Fri, 3 Sep 2010 20:20:02 +0000 (20:20 +0000)]
Reintroduce a simple function refactoring done in r112934, also without any functionality changes

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

13 years agoReapply piecies of r112942 and r112934 which don't do
Bruno Cardoso Lopes [Fri, 3 Sep 2010 20:10:35 +0000 (20:10 +0000)]
Reapply piecies of r112942 and r112934 which don't do
functional changes

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

13 years agoReapply Fix comment
Bruno Cardoso Lopes [Fri, 3 Sep 2010 19:55:05 +0000 (19:55 +0000)]
Reapply Fix comment

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

13 years agoRevert r112934, "- Use specific nodes to match unpckl masks.", which introduced
Daniel Dunbar [Fri, 3 Sep 2010 19:38:11 +0000 (19:38 +0000)]
Revert r112934, "- Use specific nodes to match unpckl masks.", which introduced
some infinite loop and select failures.
 - Apologies for eager reverting, but its branch day.

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

13 years agoRevert r112938 "Fix comment", which depends on r112934, which introduced some
Daniel Dunbar [Fri, 3 Sep 2010 19:38:08 +0000 (19:38 +0000)]
Revert r112938 "Fix comment", which depends on r112934, which introduced some
infinite loop and select failures.

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

13 years agoRevert r112942, "Use punpckh and unpckh family of nodes instead of using unpckh
Daniel Dunbar [Fri, 3 Sep 2010 19:38:05 +0000 (19:38 +0000)]
Revert r112942, "Use punpckh and unpckh family of nodes instead of using unpckh
mask pattern fragment", which depends on r112934, which introduced some infinite
loop and select failures.

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

13 years agoAdd a missing check when legalizing a vector extending load. This doesn't
Bob Wilson [Fri, 3 Sep 2010 19:20:37 +0000 (19:20 +0000)]
Add a missing check when legalizing a vector extending load.  This doesn't
solve the root problem, but it corrects the bug in the code I added to
support legalizing in the case where the non-extended type is also legal.

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

13 years agoGet rid of "passing signed into unsigned parameter" warning on PPC.
Bill Wendling [Fri, 3 Sep 2010 19:09:46 +0000 (19:09 +0000)]
Get rid of "passing signed into unsigned parameter" warning on PPC.

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

13 years agoAdd support for simplifying a load from a computed value to a load from a global...
Owen Anderson [Fri, 3 Sep 2010 19:08:37 +0000 (19:08 +0000)]
Add support for simplifying a load from a computed value to a load from a global when it
is provable that they're equivalent.  This fixes PR4855.

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

13 years agoQuiesce warning about non-virtual d'tor in virtual class.
Bill Wendling [Fri, 3 Sep 2010 18:41:20 +0000 (18:41 +0000)]
Quiesce warning about non-virtual d'tor in virtual class.

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

13 years agoRe-apply r112883:
Jim Grosbach [Fri, 3 Sep 2010 18:37:12 +0000 (18:37 +0000)]
Re-apply r112883:
"For ARM stack frames that utilize variable sized objects and have either
large local stack areas or require dynamic stack realignment, allocate a
base register via which to access the local frame. This allows efficient
access to frame indices not accessible via the FP (either due to being out
of range or due to dynamic realignment) or the SP (due to variable sized
object allocation). In particular, this greatly improves efficiency of access
to spill slots in Thumb functions which contain VLAs."

r112986 fixed a latent bug exposed by the above.

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

13 years agoVirtRegRewriter checks for early clobbers before it reuses an available stack
Jakob Stoklund Olesen [Fri, 3 Sep 2010 18:36:56 +0000 (18:36 +0000)]
VirtRegRewriter checks for early clobbers before it reuses an available stack
slot.

Teach it to also check for early clobbered aliases, and early clobber operands
following the current operand.

This fixes the miscompilation in PR8044 where EC registers eax and ecx were
being used for inputs.

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

13 years agoAdd a test for PR4413, which was apparently fixed at some point in the past.
Owen Anderson [Fri, 3 Sep 2010 18:33:08 +0000 (18:33 +0000)]
Add a test for PR4413, which was apparently fixed at some point in the past.

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

13 years agoCheck the local frame alignment for determining whether dynamic stack
Jim Grosbach [Fri, 3 Sep 2010 18:28:19 +0000 (18:28 +0000)]
Check the local frame alignment for determining whether dynamic stack
alignment should be performed. Otherwise dynamic realignment may trigger
when the register allocator has already used the frame pointer as a general
purpose register. That is, we need to make sure that the list of reserved
registers doesn't change after register allocation.

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

13 years agoAdd 'const' to getter function.
Jim Grosbach [Fri, 3 Sep 2010 18:17:16 +0000 (18:17 +0000)]
Add 'const' to getter function.

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

13 years agoFinish converting the rest of the NEON VLD instructions to use pseudo-
Bob Wilson [Fri, 3 Sep 2010 18:16:02 +0000 (18:16 +0000)]
Finish converting the rest of the NEON VLD instructions to use pseudo-
instructions prior to regalloc.  Since it's getting a little close to
the 2.8 branch deadline, I'll have to leave the rest of the instructions
handled by the NEONPreAllocPass for now, but I didn't want to leave half
of the VLD instructions converted and the other half not.

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

13 years agoRemove a TODO comment; this is now filed in bugzilla (PR8005).
Dan Gohman [Fri, 3 Sep 2010 18:06:11 +0000 (18:06 +0000)]
Remove a TODO comment; this is now filed in bugzilla (PR8005).

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

13 years agoFix Windows stuff to follow the existing source organization.
Dan Gohman [Fri, 3 Sep 2010 17:29:33 +0000 (17:29 +0000)]
Fix Windows stuff to follow the existing source organization.

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

13 years agoAdd PR number to test.
Owen Anderson [Fri, 3 Sep 2010 16:58:25 +0000 (16:58 +0000)]
Add PR number to test.

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

13 years agoRename 'libprofile/exported_symbols.lst' to 'libprofile/libprofile.exports'.
Mikhail Glushenkov [Fri, 3 Sep 2010 15:42:45 +0000 (15:42 +0000)]
Rename 'libprofile/exported_symbols.lst' to 'libprofile/libprofile.exports'.

Makefile.rules assumes that all EXPORTED_SYMBOL_FILEs have the .exports
extension.

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

13 years agoRevert "Rules for win32 ld shouldn't fire when cross-compiling."
Mikhail Glushenkov [Fri, 3 Sep 2010 15:42:38 +0000 (15:42 +0000)]
Revert "Rules for win32 ld shouldn't fire when cross-compiling."

This reverts commit 012b374e5b46fe93a8fdf605f5929fa8239e0960.

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

13 years agoRevert "For ARM stack frames that utilize variable sized objects and have either...
Daniel Dunbar [Fri, 3 Sep 2010 15:26:42 +0000 (15:26 +0000)]
Revert "For ARM stack frames that utilize variable sized objects and have either", it is breaking oggenc with Clang for ARMv6.

This reverts commit 8d6e29cfda270be483abf638850311670829ee65.

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

13 years agoZap dead code.
Benjamin Kramer [Fri, 3 Sep 2010 12:13:18 +0000 (12:13 +0000)]
Zap dead code.

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

13 years agoRules for win32 ld shouldn't fire when cross-compiling.
Mikhail Glushenkov [Fri, 3 Sep 2010 09:57:52 +0000 (09:57 +0000)]
Rules for win32 ld shouldn't fire when cross-compiling.

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

13 years agoReapply commit 112702 which was speculatively reverted by echristo.
Duncan Sands [Fri, 3 Sep 2010 08:31:48 +0000 (08:31 +0000)]
Reapply commit 112702 which was speculatively reverted by echristo.
Original commit message:
Use the SSAUpdator to turn calls to eh.exception that are not in a
landing pad into uses of registers rather than loads from a stack
slot.  Doesn't touch the 'orrible hack code - Bill needs to persuade
me harder :)

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

13 years agoRe-enable CorrelatedValuePropagation. I've tested nightly tests, llvm-gcc
Owen Anderson [Fri, 3 Sep 2010 04:16:28 +0000 (04:16 +0000)]
Re-enable CorrelatedValuePropagation.  I've tested nightly tests, llvm-gcc
bootstrap, and clang self-host.

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

13 years agotest/CodeGen/X86: Add explicit -mtriple=(i686|x86_64)-linux for Win32 host.
NAKAMURA Takumi [Fri, 3 Sep 2010 03:24:08 +0000 (03:24 +0000)]
test/CodeGen/X86: Add explicit -mtriple=(i686|x86_64)-linux for Win32 host.

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

13 years agoFix cmake build without native target selected.
Oscar Fuentes [Fri, 3 Sep 2010 02:22:23 +0000 (02:22 +0000)]
Fix cmake build without native target selected.

The cmake (+ MSVC) build is broken if you don't select your native
target.

e.g. 'cmake -D LLVM_TARGETS_TO_BUILD="MyNonNativeTarget" .'

This is because cmake currently sets the LLVM_NATIVE_* definitions
regardless of whether the native target is selected (causing build
errors).

Patch by Mike Gist!

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

13 years agoAVX doesn't support mm operations neither its instrinsics.
Bruno Cardoso Lopes [Fri, 3 Sep 2010 02:08:45 +0000 (02:08 +0000)]
AVX doesn't support mm operations neither its instrinsics.
The AVX versions of PALIGN and PABS* should only exist for
128-bit. Remove the unnecessary stuff.

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

13 years agoUse punpckh and unpckh family of nodes instead of using unpckh mask pattern fragment
Bruno Cardoso Lopes [Fri, 3 Sep 2010 01:39:08 +0000 (01:39 +0000)]
Use punpckh and unpckh family of nodes instead of using unpckh mask pattern fragment

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

13 years agoReplace NEON vabdl, vaba, and vabal intrinsics with combinations of the
Bob Wilson [Fri, 3 Sep 2010 01:35:08 +0000 (01:35 +0000)]
Replace NEON vabdl, vaba, and vabal intrinsics with combinations of the
vabd intrinsic and add and/or zext operations.  In the case of vaba, this
also avoids the need for a DAG combine pattern to combine vabd with add.
Update tests.  Auto-upgrade the old intrinsics.

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

13 years agoFix comment
Bruno Cardoso Lopes [Fri, 3 Sep 2010 01:28:51 +0000 (01:28 +0000)]
Fix comment

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

13 years ago- Use specific nodes to match unpckl masks.
Bruno Cardoso Lopes [Fri, 3 Sep 2010 01:24:00 +0000 (01:24 +0000)]
- Use specific nodes to match unpckl masks.
- Teach getShuffleScalarElt how to handle more target
specific nodes, so the DAGCombine can make use of it.
- Add another hack to avoid the node update problem
during legalization. More description on the comments

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

13 years agoStop emitting predicate functions. They are no longer used.
Jakob Stoklund Olesen [Fri, 3 Sep 2010 00:39:50 +0000 (00:39 +0000)]
Stop emitting predicate functions. They are no longer used.

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

13 years agoSimple branch instruction support.
Eric Christopher [Fri, 3 Sep 2010 00:35:47 +0000 (00:35 +0000)]
Simple branch instruction support.

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