oota-llvm.git
14 years agoMCELF: Fix a thinko of mine.
Benjamin Kramer [Thu, 26 Aug 2010 18:12:04 +0000 (18:12 +0000)]
MCELF: Fix a thinko of mine.

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

14 years agoFix comment typos.
Bob Wilson [Thu, 26 Aug 2010 18:08:11 +0000 (18:08 +0000)]
Fix comment typos.

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

14 years agoFix prototypes.
Devang Patel [Thu, 26 Aug 2010 17:47:45 +0000 (17:47 +0000)]
Fix prototypes.

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

14 years agoMake JumpThreading smart enough to properly thread StrSwitch when it's compiled with...
Owen Anderson [Thu, 26 Aug 2010 17:40:24 +0000 (17:40 +0000)]
Make JumpThreading smart enough to properly thread StrSwitch when it's compiled with clang++.

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

14 years agoMCELF: Compensate for the addend on i386. Patch by Roman Divacky, with some cleanups.
Benjamin Kramer [Thu, 26 Aug 2010 17:23:02 +0000 (17:23 +0000)]
MCELF: Compensate for the addend on i386. Patch by Roman Divacky, with some cleanups.

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

14 years agoRestrict the register to tGPR to make sure the str instruction will be
Jim Grosbach [Thu, 26 Aug 2010 17:02:47 +0000 (17:02 +0000)]
Restrict the  register to tGPR to make sure the str instruction will be
encodable as a 16-bit wide instruction.

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

14 years agoRevert r112176; it broke test/CodeGen/Thumb2/thumb2-cmn.ll.
Dan Gohman [Thu, 26 Aug 2010 15:50:25 +0000 (15:50 +0000)]
Revert r112176; it broke test/CodeGen/Thumb2/thumb2-cmn.ll.

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

14 years agoReapply r112091 and r111922, support for metadata linking, with a
Dan Gohman [Thu, 26 Aug 2010 15:41:53 +0000 (15:41 +0000)]
Reapply r112091 and r111922, support for metadata linking, with a
fix: add a flag to MapValue and friends which indicates whether
any module-level mappings are being made. In the common case of
inlining, no module-level mappings are needed, so MapValue doesn't
need to examine non-function-local metadata, which can be very
expensive in the case of a large module with really deep metadata
(e.g. a large C++ program compiled with -g).

This flag is a little awkward; perhaps eventually it can be moved
into the ClonedCodeInfo class.

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

14 years agoStringRef::compare_numeric also differed from StringRef::compare for characters ...
Benjamin Kramer [Thu, 26 Aug 2010 15:25:35 +0000 (15:25 +0000)]
StringRef::compare_numeric also differed from StringRef::compare for characters > 127.

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

14 years agoDo unsigned char comparisons in StringRef::compare_lower to be more consistent with...
Benjamin Kramer [Thu, 26 Aug 2010 14:21:08 +0000 (14:21 +0000)]
Do unsigned char comparisons in StringRef::compare_lower to be more consistent with compare in corner cases.

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

14 years agoThere seems to be a (potential) hardware bug with the CMN instruction and
Bill Wendling [Thu, 26 Aug 2010 09:07:33 +0000 (09:07 +0000)]
There seems to be a (potential) hardware bug with the CMN instruction and
comparison with 0. These two pieces of code should give identical results:

  rsbs r1, r1, 0
  cmp  r0, r1
  mov  r0, #0
  it   ls
  mov  r0, #1

and:

  cmn  r0, r1
  mov  r0, #0
  it   ls
  mov  r0, #1

However, the CMN gives the *opposite* result when r1 is 0. This is because the
carry flag is set in the CMP case but not in the CMN case. In short, the CMP
instruction doesn't perform a truncate of the (logical) NOT of 0 plus the value
of r0 and the carry bit (because the "carry bit" parameter to AddWithCarry is
defined as 1 in this case, the carry flag will always be set when r0 >= 0). The
CMN instruction doesn't perform a NOT of 0 so there is never a "carry" when this
AddWithCarry is performed (because the "carry bit" parameter to AddWithCarry is
defined as 0).

The AddWithCarry in the CMP case seems to be relying upon the identity:

  ~x + 1 = -x

However when x is 0 and unsigned, this doesn't hold:

   x = 0
  ~x = 0xFFFF FFFF
  ~x + 1 = 0x1 0000 0000
  (-x = 0) != (0x1 0000 0000 = ~x + 1)

Therefore, we should disable *all* versions of CMN, especially when comparing
against zero, until we can limit when the CMN instruction is used (when we know
that the RHS is not 0) or when we have a hardware fix for this.

(See the ARM docs for the "AddWithCarry" pseudo-code.)

This is related to <rdar://problem/7569620>.

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

14 years agoAdd a hackaround for PR7993 which is causing failures on x86 builders that lack sse2.
Chris Lattner [Thu, 26 Aug 2010 06:57:07 +0000 (06:57 +0000)]
Add a hackaround for PR7993 which is causing failures on x86 builders that lack sse2.

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

14 years agoI think enough general codegen bugs are fixed to allow this to work
Chris Lattner [Thu, 26 Aug 2010 05:52:42 +0000 (05:52 +0000)]
I think enough general codegen bugs are fixed to allow this to work
on random hosts, lets see!

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

14 years agoimplement SplitVecOp_CONCAT_VECTORS, fixing the included testcase with SSE1.
Chris Lattner [Thu, 26 Aug 2010 05:51:22 +0000 (05:51 +0000)]
implement SplitVecOp_CONCAT_VECTORS, fixing the included testcase with SSE1.

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

14 years agoUse pseudo instructions for VST1d64Q.
Bob Wilson [Thu, 26 Aug 2010 05:33:30 +0000 (05:33 +0000)]
Use pseudo instructions for VST1d64Q.

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

14 years agoMake sure this forces the x86 targets
Chris Lattner [Thu, 26 Aug 2010 05:25:05 +0000 (05:25 +0000)]
Make sure this forces the x86 targets

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

14 years agofix sse1 only codegen in x86-64 mode, which is something we
Chris Lattner [Thu, 26 Aug 2010 05:24:29 +0000 (05:24 +0000)]
fix sse1 only codegen in x86-64 mode, which is something we
apparently try to support.

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

14 years agoRevert r111922, "MapValue support for MDNodes. This is similar to r109117,
Daniel Dunbar [Thu, 26 Aug 2010 03:48:11 +0000 (03:48 +0000)]
Revert r111922, "MapValue support for MDNodes. This is similar to r109117,
except ...", it is causing *massive* performance regressions when building Clang
with itself (-O3 -g).

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

14 years agoRevert r112091, "Remap metadata attached to instructions when remapping
Daniel Dunbar [Thu, 26 Aug 2010 03:48:08 +0000 (03:48 +0000)]
Revert r112091, "Remap metadata attached to instructions when remapping
individual ...", which depends on r111922, which I am reverting.

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

14 years agozap dead code.
Chris Lattner [Thu, 26 Aug 2010 02:57:35 +0000 (02:57 +0000)]
zap dead code.

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

14 years agoUpdated CMake library dependencies. Removed unnecessary component name
Oscar Fuentes [Thu, 26 Aug 2010 02:29:53 +0000 (02:29 +0000)]
Updated CMake library dependencies. Removed unnecessary component name
from llvm-link/CMakeLists.txt

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

14 years agoSmallVector's growth policies don't like starting from zero capacity.
John McCall [Thu, 26 Aug 2010 02:11:48 +0000 (02:11 +0000)]
SmallVector's growth policies don't like starting from zero capacity.
I think there are good reasons to change this, but in the interests
of short-term stability, make SmallVector<...,0> reserve non-zero
capacity in its constructors.  This means that SmallVector<...,0>
uses more memory than SmallVector<...,1> and should really only be
used (unless/until this workaround is removed) by clients that
care about using SmallVector with an incomplete type.

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

14 years agoremove dead proto
Chris Lattner [Thu, 26 Aug 2010 01:14:37 +0000 (01:14 +0000)]
remove dead proto

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

14 years agozap dead code.
Chris Lattner [Thu, 26 Aug 2010 01:13:54 +0000 (01:13 +0000)]
zap dead code.

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

14 years agoFix PR7748 without using microsoft extensions
Bruno Cardoso Lopes [Thu, 26 Aug 2010 01:02:53 +0000 (01:02 +0000)]
Fix PR7748 without using microsoft extensions

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

14 years agoEnable pre-RA virtual frame base register allocation. rdar://8277890
Jim Grosbach [Thu, 26 Aug 2010 00:58:06 +0000 (00:58 +0000)]
Enable pre-RA virtual frame base register allocation. rdar://8277890

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

14 years agoRewrite ExtractGV, removing a bunch of stuff that didn't fully work,
Dan Gohman [Thu, 26 Aug 2010 00:22:55 +0000 (00:22 +0000)]
Rewrite ExtractGV, removing a bunch of stuff that didn't fully work,
and was over-complicated, and replacing it with a simple implementation.

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

14 years agoRevert svn 107892 (with changes to work with trunk). It caused a crash if
Bob Wilson [Thu, 26 Aug 2010 00:13:36 +0000 (00:13 +0000)]
Revert svn 107892 (with changes to work with trunk).  It caused a crash if
a VLD result was not used (Radar 8355607).  It should also fix pr7988, but
I haven't verified that yet.

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

14 years agotemporarily disable this, which started failing on the llvm-i686-linux
Chris Lattner [Wed, 25 Aug 2010 23:43:14 +0000 (23:43 +0000)]
temporarily disable this, which started failing on the llvm-i686-linux
builder.  I will investigate tonight.

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

14 years agoConvert llvm-extract to use lazy loading. This makes it substantially
Dan Gohman [Wed, 25 Aug 2010 23:33:07 +0000 (23:33 +0000)]
Convert llvm-extract to use lazy loading. This makes it substantially
faster on large modules.

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

14 years agowe should pattern match the SSE complex arithmetic ops.
Chris Lattner [Wed, 25 Aug 2010 23:31:42 +0000 (23:31 +0000)]
we should pattern match the SSE complex arithmetic ops.

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

14 years agoStart converting NEON load/stores to use pseudo instructions, beginning here
Bob Wilson [Wed, 25 Aug 2010 23:27:42 +0000 (23:27 +0000)]
Start converting NEON load/stores to use pseudo instructions, beginning here
with the VST4 instructions.  Until after register allocation, we want to
represent sets of adjacent registers by a single super-register.  These
VST4 pseudo instructions have a single QQ or QQQQ source register operand.
They get expanded to the real VST4 instructions with 4 separate D register
operands.  Once this conversion is complete, we'll be able to remove the
NEONPreAllocPass and avoid some fragile and hacky code elsewhere.

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

14 years agoProvide an explicit specialization of SmallVector at N=0 which does
John McCall [Wed, 25 Aug 2010 23:11:24 +0000 (23:11 +0000)]
Provide an explicit specialization of SmallVector at N=0 which does
not require its type argument to be complete if no members are
actually used.

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

14 years agoadd a specialization for the MVT form of getTypeAction, since it is
Chris Lattner [Wed, 25 Aug 2010 23:05:45 +0000 (23:05 +0000)]
add a specialization for the MVT form of getTypeAction, since it is
trivial.

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

14 years agoremove some llvmcontext arguments that are now dead post-refactoring.
Chris Lattner [Wed, 25 Aug 2010 23:00:45 +0000 (23:00 +0000)]
remove some llvmcontext arguments that are now dead post-refactoring.

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

14 years agoChange handling of illegal vector types to widen when possible instead of
Chris Lattner [Wed, 25 Aug 2010 22:49:25 +0000 (22:49 +0000)]
Change handling of illegal vector types to widen when possible instead of
expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats.  This
affects two places in the code: handling cross block values and handling
function return and arguments.  Since vectors are already widened by
legalizetypes, this gives us much better code and unblocks x86-64 abi
and SPU abi work.

For example, this (which is a silly example of a cross-block value):
define <4 x float> @test2(<4 x float> %A) nounwind {
 %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
 %C = fadd <2 x float> %B, %B
  br label %BB
BB:
 %D = fadd <2 x float> %C, %C
 %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
 ret <4 x float> %E
}

Now compiles into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 addps %xmm0, %xmm0
 ret

previously it compiled into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 pshufd $1, %xmm0, %xmm1
                                        ## kill: XMM0<def> XMM0<kill> XMM0<def>
 insertps $0, %xmm0, %xmm0
 insertps $16, %xmm1, %xmm0
 addps %xmm0, %xmm0
 ret

This implements rdar://8230384

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

14 years agotidy up
Chris Lattner [Wed, 25 Aug 2010 22:45:53 +0000 (22:45 +0000)]
tidy up

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

14 years agoRemap metadata attached to instructions when remapping individual
Dan Gohman [Wed, 25 Aug 2010 21:36:50 +0000 (21:36 +0000)]
Remap metadata attached to instructions when remapping individual
instructions, not when remapping modules.

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

14 years agoRevert this for now, PUNPCKLDQ dont operate on v4f32
Bruno Cardoso Lopes [Wed, 25 Aug 2010 21:26:37 +0000 (21:26 +0000)]
Revert this for now, PUNPCKLDQ dont operate on v4f32

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

14 years agoX86: Fix misencode of RI64mi8. This fixes OpenSSL / x86_64-apple-darwin10 / clang...
Daniel Dunbar [Wed, 25 Aug 2010 21:11:02 +0000 (21:11 +0000)]
X86: Fix misencode of RI64mi8. This fixes OpenSSL / x86_64-apple-darwin10 / clang -O3.

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

14 years agoFix comment.
Devang Patel [Wed, 25 Aug 2010 20:41:24 +0000 (20:41 +0000)]
Fix comment.

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

14 years agoRemove dead argument.
Devang Patel [Wed, 25 Aug 2010 20:39:26 +0000 (20:39 +0000)]
Remove dead argument.

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

14 years agoAdd some statistics for PEI register scavenging
Jim Grosbach [Wed, 25 Aug 2010 20:34:28 +0000 (20:34 +0000)]
Add some statistics for PEI register scavenging

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

14 years agoAdd a FIXME comment.
Dan Gohman [Wed, 25 Aug 2010 20:23:38 +0000 (20:23 +0000)]
Add a FIXME comment.

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

14 years agoFix the bitcode reader to clear out function-specific state
Dan Gohman [Wed, 25 Aug 2010 20:22:53 +0000 (20:22 +0000)]
Fix the bitcode reader to clear out function-specific state
from MDValueList between each function, now that the bitcode
writer is reusing the index space for function-local metadata.

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

14 years agoFix a bug found by inspection.
Dan Gohman [Wed, 25 Aug 2010 20:20:21 +0000 (20:20 +0000)]
Fix a bug found by inspection.

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

14 years agoAdd a comment.
Dan Gohman [Wed, 25 Aug 2010 20:17:19 +0000 (20:17 +0000)]
Add a comment.

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

14 years agoMCELF: Use precomputed symbol indices, patch by Roman Divacky.
Benjamin Kramer [Wed, 25 Aug 2010 20:09:43 +0000 (20:09 +0000)]
MCELF: Use precomputed symbol indices, patch by Roman Divacky.

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

14 years agoFix header define to reflect the name of the file.
Eric Christopher [Wed, 25 Aug 2010 19:28:39 +0000 (19:28 +0000)]
Fix header define to reflect the name of the file.

Patch by Adam Treat!

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

14 years agoMC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.
Michael J. Spencer [Wed, 25 Aug 2010 19:27:27 +0000 (19:27 +0000)]
MC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.

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

14 years agoDon't override the var from the enclosing scope.
Jim Grosbach [Wed, 25 Aug 2010 19:11:34 +0000 (19:11 +0000)]
Don't override the var from the enclosing scope.

When doing copy/paste/modify, it's apparently rather important to remember
the 'modify' bit...

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

14 years agozap dead code
Chris Lattner [Wed, 25 Aug 2010 19:00:00 +0000 (19:00 +0000)]
zap dead code

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

14 years agoDIGlobalVariable can be used to encode debug info for globals that are directly...
Devang Patel [Wed, 25 Aug 2010 18:52:02 +0000 (18:52 +0000)]
DIGlobalVariable can be used to encode debug info for  globals that are directly folded into a constant by FE.

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

14 years agolto_codegen_set_gcc_path was removed.
Dan Gohman [Wed, 25 Aug 2010 18:37:04 +0000 (18:37 +0000)]
lto_codegen_set_gcc_path was removed.

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

14 years agoFix a few missing entries in lto.exports.
Dan Gohman [Wed, 25 Aug 2010 18:22:12 +0000 (18:22 +0000)]
Fix a few missing entries in lto.exports.

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

14 years agoRemove dead recursive function. Yay for clang -Wunused-function.
Benjamin Kramer [Wed, 25 Aug 2010 17:27:58 +0000 (17:27 +0000)]
Remove dead recursive function. Yay for clang -Wunused-function.

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

14 years agoClear FunctionLocalMDs in purgeFunction along with the rest of the
Dan Gohman [Wed, 25 Aug 2010 17:11:16 +0000 (17:11 +0000)]
Clear FunctionLocalMDs in purgeFunction along with the rest of the
function-specific state.

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

14 years agoFix whitespace.
Dan Gohman [Wed, 25 Aug 2010 17:09:50 +0000 (17:09 +0000)]
Fix whitespace.

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

14 years agoEliminate an unnecessary cast.
Dan Gohman [Wed, 25 Aug 2010 17:09:03 +0000 (17:09 +0000)]
Eliminate an unnecessary cast.

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

14 years agoARM/Thumb2: Fix a misselect in getARMCmp, when attempting to adjust a signed
Daniel Dunbar [Wed, 25 Aug 2010 16:58:05 +0000 (16:58 +0000)]
ARM/Thumb2: Fix a misselect in getARMCmp, when attempting to adjust a signed
comparison that would overflow.
 - The other under/overflow cases can't actually happen because the immediates
   which would trigger them are legal (so we don't enter this code), but
   adjusted the style to make it clear the transform is always valid.

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

14 years agoRegenerate.
Eric Christopher [Wed, 25 Aug 2010 08:45:06 +0000 (08:45 +0000)]
Regenerate.

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

14 years agoRemove getsect checks, the result is unused and is broken anyhow.
Eric Christopher [Wed, 25 Aug 2010 08:44:54 +0000 (08:44 +0000)]
Remove getsect checks, the result is unused and is broken anyhow.
Fixes PR7967.

Owen: You added these, any reason?

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

14 years agoDo type checks before we bother to do everything else.
Eric Christopher [Wed, 25 Aug 2010 08:43:57 +0000 (08:43 +0000)]
Do type checks before we bother to do everything else.

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

14 years agoAdd another basic test cribbed from the x86 fast-isel tests.
Eric Christopher [Wed, 25 Aug 2010 07:57:29 +0000 (07:57 +0000)]
Add another basic test cribbed from the x86 fast-isel tests.

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

14 years agoRun this on thumb and arm.
Eric Christopher [Wed, 25 Aug 2010 07:53:15 +0000 (07:53 +0000)]
Run this on thumb and arm.

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

14 years agoFix nasty mingw32 bug, which e.g. prevented llvm-gcc bootstrap there.
Anton Korobeynikov [Wed, 25 Aug 2010 07:50:11 +0000 (07:50 +0000)]
Fix nasty mingw32 bug, which e.g. prevented llvm-gcc bootstrap there.
Mark _alloca call as clobberring EFLAGS, otherwise some DCE might remove
other flags-clobberring stuff (e.g. cmp instructions) occuring after
_alloca call.

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

14 years agoMake this testcase actually executed with fast-isel on arm.
Eric Christopher [Wed, 25 Aug 2010 07:47:00 +0000 (07:47 +0000)]
Make this testcase actually executed with fast-isel on arm.

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

14 years agoReorganize load mechanisms. Handle types in a little less fixed way.
Eric Christopher [Wed, 25 Aug 2010 07:23:49 +0000 (07:23 +0000)]
Reorganize load mechanisms. Handle types in a little less fixed way.
Fix some todos.  No functional change.

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

14 years agoApparently this is needed for llvm-link to link.
Eric Christopher [Wed, 25 Aug 2010 06:45:22 +0000 (06:45 +0000)]
Apparently this is needed for llvm-link to link.

Untested.

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

14 years agoAllow strict subclasses of register classes, this way we can handle
Eric Christopher [Wed, 25 Aug 2010 04:58:56 +0000 (04:58 +0000)]
Allow strict subclasses of register classes, this way we can handle
ARM instructions with:

foo GPR, rGPR

which happens a lot.

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

14 years agobuildbot/valgrind: Ignore leaks in /usr/bin/as.
Daniel Dunbar [Wed, 25 Aug 2010 03:40:20 +0000 (03:40 +0000)]
buildbot/valgrind: Ignore leaks in /usr/bin/as.

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

14 years agoPUNPCKLDQ should also be used for v4f32
Bruno Cardoso Lopes [Wed, 25 Aug 2010 02:55:40 +0000 (02:55 +0000)]
PUNPCKLDQ should also be used for v4f32

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

14 years agoteach lowering to get target specific nodes for pshufd, emulating the same isel behav...
Bruno Cardoso Lopes [Wed, 25 Aug 2010 02:35:37 +0000 (02:35 +0000)]
teach lowering to get target specific nodes for pshufd, emulating the same isel behavior for now, so we can pass all vector shuffle tests

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

14 years agoConvert test to use filecheck and make it more specific
Bruno Cardoso Lopes [Wed, 25 Aug 2010 01:47:16 +0000 (01:47 +0000)]
Convert test to use filecheck and make it more specific

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

14 years agoIn the default address space, any GEP off of null results in a trap value if you...
Owen Anderson [Wed, 25 Aug 2010 01:16:47 +0000 (01:16 +0000)]
In the default address space, any GEP off of null results in a trap value if you try to load it.  Thus,
any load in the default address space that completes implies that the base value that it GEP'd from
was not null.

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

14 years agoSplit out register class subclassing to a separate function and clean up
Eric Christopher [Wed, 25 Aug 2010 00:41:18 +0000 (00:41 +0000)]
Split out register class subclassing to a separate function and clean up
accordingly.  No functional change.

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

14 years agoFix comment.
Eric Christopher [Tue, 24 Aug 2010 23:21:59 +0000 (23:21 +0000)]
Fix comment.

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

14 years agoDon't include the is-function-local bit in the FoldingSetNodeID
Dan Gohman [Tue, 24 Aug 2010 23:21:12 +0000 (23:21 +0000)]
Don't include the is-function-local bit in the FoldingSetNodeID
for MDNodes, since this information is effectively implied by
the operands. This allow allows the code to avoid doing a
recursive is-it-really-function-local check in some cases.

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

14 years agosplit the vector case of getCopyFromParts out to its own function,
Chris Lattner [Tue, 24 Aug 2010 23:20:40 +0000 (23:20 +0000)]
split the vector case of getCopyFromParts out to its own function,
no functionality change.

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

14 years agoUse Bits.data() instead of &Bits[0].
Dan Gohman [Tue, 24 Aug 2010 23:16:53 +0000 (23:16 +0000)]
Use Bits.data() instead of &Bits[0].

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

14 years agosplit the vector case out of getCopyToParts into its own function. No
Chris Lattner [Tue, 24 Aug 2010 23:10:06 +0000 (23:10 +0000)]
split the vector case out of getCopyToParts into its own function.  No
functionality change.

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

14 years agotidy up, reduce indentation
Chris Lattner [Tue, 24 Aug 2010 22:43:11 +0000 (22:43 +0000)]
tidy up, reduce indentation

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

14 years agoFix predicate and add a comment.
Eric Christopher [Tue, 24 Aug 2010 22:34:11 +0000 (22:34 +0000)]
Fix predicate and add a comment.

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

14 years agoRework braindead conditionals I put in yesterday.
Eric Christopher [Tue, 24 Aug 2010 22:07:27 +0000 (22:07 +0000)]
Rework braindead conditionals I put in yesterday.

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

14 years agoFix thumb2 mode loads to have the correct operand ordering. Add a todo
Eric Christopher [Tue, 24 Aug 2010 22:03:02 +0000 (22:03 +0000)]
Fix thumb2 mode loads to have the correct operand ordering.  Add a todo
to fix this in the port.

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

14 years agoNULL loads are only invalid in the default address space.
Owen Anderson [Tue, 24 Aug 2010 22:00:55 +0000 (22:00 +0000)]
NULL loads are only invalid in the default address space.

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

14 years agoAdd support for inferring values for the default cases of switches.
Owen Anderson [Tue, 24 Aug 2010 21:59:42 +0000 (21:59 +0000)]
Add support for inferring values for the default cases of switches.

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

14 years agoAdd ARM heuristic for when to allocate a virtual base register for stack
Jim Grosbach [Tue, 24 Aug 2010 21:19:33 +0000 (21:19 +0000)]
Add ARM heuristic for when to allocate a virtual base register for stack
access. rdar://8277890&7352504

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

14 years agoChange the parsing of .loc back to allow the LineNumber field to be optional as
Kevin Enderby [Tue, 24 Aug 2010 21:14:47 +0000 (21:14 +0000)]
Change the parsing of .loc back to allow the LineNumber field to be optional as
it is with other assemblers.

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

14 years agoFix COFF x86-64 relocations. PR7960.
Michael J. Spencer [Tue, 24 Aug 2010 21:04:52 +0000 (21:04 +0000)]
Fix COFF x86-64 relocations. PR7960.

Multiple symbol reloc handling part of the patch by Cameron Esfahani.

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

14 years agoXFAIL this on mingw, following remove_arguments_test.ll.
Dan Gohman [Tue, 24 Aug 2010 20:54:50 +0000 (20:54 +0000)]
XFAIL this on mingw, following remove_arguments_test.ll.

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

14 years agoAdd support for inferring that a load from a pointer implies that it is not null.
Owen Anderson [Tue, 24 Aug 2010 20:47:29 +0000 (20:47 +0000)]
Add support for inferring that a load from a pointer implies that it is not null.

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

14 years agoFirst bit of support for the dwarf .loc directive. This patch updates the
Kevin Enderby [Tue, 24 Aug 2010 20:32:42 +0000 (20:32 +0000)]
First bit of support for the dwarf .loc directive.  This patch updates the
needed parsing for the .loc directive and saves the current info from that
into the context.  The next patch will take the current loc info after an
instruction is assembled and save that info into a vector for each section for
use to build the line number tables.  The patch after that will encode the info
from those vectors into the output file as the dwarf line tables.

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

14 years agoAdd a testcase for basic bugpointing in the presence of metadata.
Dan Gohman [Tue, 24 Aug 2010 20:23:51 +0000 (20:23 +0000)]
Add a testcase for basic bugpointing in the presence of metadata.

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

14 years ago- Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
Bill Wendling [Tue, 24 Aug 2010 20:00:52 +0000 (20:00 +0000)]
- Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
- Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp.

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

14 years agoMC/X86: Tweak imul recognition, previous hack only applies for the imul form
Daniel Dunbar [Tue, 24 Aug 2010 19:37:56 +0000 (19:37 +0000)]
MC/X86: Tweak imul recognition, previous hack only applies for the imul form
taking immediates.

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

14 years agoLink NamedMDNodes after linking GlobalValues, so that MDNodes
Dan Gohman [Tue, 24 Aug 2010 19:37:11 +0000 (19:37 +0000)]
Link NamedMDNodes after linking GlobalValues, so that MDNodes
which reference GlobalValues are properly remapped.

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

14 years agoWhen linking NamedMDNodes, remap their operands.
Dan Gohman [Tue, 24 Aug 2010 19:31:04 +0000 (19:31 +0000)]
When linking NamedMDNodes, remap their operands.

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

14 years agoMC/X86: Add custom hack for recognizing "imul $12, %eax" and friends.
Daniel Dunbar [Tue, 24 Aug 2010 19:24:18 +0000 (19:24 +0000)]
MC/X86: Add custom hack for recognizing "imul $12, %eax" and friends.

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

14 years agoMC/AsmParser: Change ParseExpression to use ParseIdentifier(), to support
Daniel Dunbar [Tue, 24 Aug 2010 19:13:42 +0000 (19:13 +0000)]
MC/AsmParser: Change ParseExpression to use ParseIdentifier(), to support
dollars in identifiers.

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