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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 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

13 years agoMC/X86: Warn on scale factors > 1 without index register, instead of erroring,
Daniel Dunbar [Tue, 24 Aug 2010 19:13:38 +0000 (19:13 +0000)]
MC/X86: Warn on scale factors > 1 without index register, instead of erroring,
for 'as' compatibility.

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

13 years agoMove enabling the local stack allocation pass into the target where it belongs.
Jim Grosbach [Tue, 24 Aug 2010 19:05:43 +0000 (19:05 +0000)]
Move enabling the local stack allocation pass into the target where it belongs.
For now it's still a command line option, but the interface to the generic
code doesn't need to know that.

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

13 years agoUse MapValue in the Linker instead of having a private function
Dan Gohman [Tue, 24 Aug 2010 18:50:07 +0000 (18:50 +0000)]
Use MapValue in the Linker instead of having a private function
which does the same thing. This eliminates redundant code and
handles MDNodes better. MDNode linking still doesn't fully
work yet though.

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

13 years agoMC/Parser: Accept leading dollar signs in identifiers.
Daniel Dunbar [Tue, 24 Aug 2010 18:12:12 +0000 (18:12 +0000)]
MC/Parser: Accept leading dollar signs in identifiers.
 - Implemented by manually splicing the tokens. If this turns out to be
   problematically platform specific, a more elegant solution would be to
   implement some context dependent lexing support.

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

13 years agoDon't cast away qualifiers with C-style casts.
Dan Gohman [Tue, 24 Aug 2010 18:09:44 +0000 (18:09 +0000)]
Don't cast away qualifiers with C-style casts.

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

13 years agoadd ARM cmd line option to force always using virtual base regs when possible.
Jim Grosbach [Tue, 24 Aug 2010 18:04:52 +0000 (18:04 +0000)]
add ARM cmd line option to force always using virtual base regs when possible.
Intended to help ease reproducing problems by increasing base register usage
after heuristics for only using the when needed are in place.

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

13 years agoApply "Win32's Hybrid path separator in argv[0] should be accepted to bugpoint",
Chris Lattner [Tue, 24 Aug 2010 17:44:07 +0000 (17:44 +0000)]
Apply "Win32's Hybrid path separator in argv[0] should be accepted to bugpoint",
patch by NAKAMURA Takumi!

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

13 years agoRelocate against parent if the symbol is not in section or it's a common symbol,...
Benjamin Kramer [Tue, 24 Aug 2010 17:34:39 +0000 (17:34 +0000)]
Relocate against parent if the symbol is not in section or it's a common symbol, from Roman Divacky.

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

13 years agoTurn LVI on, previously detected failures should be fixed now.
Owen Anderson [Tue, 24 Aug 2010 17:21:18 +0000 (17:21 +0000)]
Turn LVI on, previously detected failures should be fixed now.

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

13 years agoMapValue support for MDNodes. This is similar to r109117, except
Dan Gohman [Tue, 24 Aug 2010 17:10:10 +0000 (17:10 +0000)]
MapValue support for MDNodes. This is similar to r109117, except
that it avoids a lot of unnecessary cloning by avoiding remapping
MDNode cycles when none of the nodes in the cycle actually need to
be remapped. Also it uses the new temporary MDNode mechanism.

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

13 years agoFix X86's isLegalAddressingMode to recognize that static addresses
Dan Gohman [Tue, 24 Aug 2010 15:55:12 +0000 (15:55 +0000)]
Fix X86's isLegalAddressingMode to recognize that static addresses
need not be RIP-relative in small mode.

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

13 years agoMDNode, MDString, and NamedMDNode are not meant to be subclassed;
Dan Gohman [Tue, 24 Aug 2010 15:34:03 +0000 (15:34 +0000)]
MDNode, MDString, and NamedMDNode are not meant to be subclassed;
make their protected members private. And remove an unnecessary
explicit keyword.

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

13 years agoAdd a comment explaining why this code doesn't just call
Dan Gohman [Tue, 24 Aug 2010 14:35:45 +0000 (14:35 +0000)]
Add a comment explaining why this code doesn't just call
ParseMetadataValue.

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

13 years agoAdd a comment explaining why this code is more complex than it
Dan Gohman [Tue, 24 Aug 2010 14:31:06 +0000 (14:31 +0000)]
Add a comment explaining why this code is more complex than it
initially seems it should require.

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

13 years agoFix SPU BE to use all the available return registers.
Kalle Raiskila [Tue, 24 Aug 2010 11:50:48 +0000 (11:50 +0000)]
Fix SPU BE to use all the available return registers.
llc used to assert on the added testcase.

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

13 years agoRemove some dead code from SPU BE that remained
Kalle Raiskila [Tue, 24 Aug 2010 11:05:51 +0000 (11:05 +0000)]
Remove some dead code from SPU BE that remained
from 64bit vector support.

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

13 years agoCheck in a couple of changes that I apparently never committed:
John McCall [Tue, 24 Aug 2010 09:16:51 +0000 (09:16 +0000)]
Check in a couple of changes that I apparently never committed:
  - teach DifferenceEngine to unify successors of calls and invokes
    in certain circumstances
  - basic blocks actually don't have their own numbering;  did that change?
  - add llvm-diff to the Makefile and CMake build systems

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

13 years agoDon't assume that all constants with integer types are ConstantInts.
Owen Anderson [Tue, 24 Aug 2010 07:55:44 +0000 (07:55 +0000)]
Don't assume that all constants with integer types are ConstantInts.

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

13 years agoAdd braces to fix dangling else.
Dan Gohman [Tue, 24 Aug 2010 02:40:27 +0000 (02:40 +0000)]
Add braces to fix dangling else.

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

13 years agoExtend function-local metadata to be usable as attachments.
Dan Gohman [Tue, 24 Aug 2010 02:24:03 +0000 (02:24 +0000)]
Extend function-local metadata to be usable as attachments.

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

13 years agoWhen we know we have an MDValue or MDString, call EnumerateMetadata
Dan Gohman [Tue, 24 Aug 2010 02:10:52 +0000 (02:10 +0000)]
When we know we have an MDValue or MDString, call EnumerateMetadata
directly instead of going through EnumerateValue.

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

13 years agoGive ParseInstructionMetadata access to the PerFunctionState object.
Dan Gohman [Tue, 24 Aug 2010 02:05:17 +0000 (02:05 +0000)]
Give ParseInstructionMetadata access to the PerFunctionState object.
This is in preparation for generalizing its parsing of function-local
values.

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

13 years agoSimplify this code. NamedMDNode operands are MDNodes.
Dan Gohman [Tue, 24 Aug 2010 02:01:24 +0000 (02:01 +0000)]
Simplify this code. NamedMDNode operands are MDNodes.

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

13 years agoUse pshufhw and pshuflw in more cases and fix getTargetShuffleNode number of arguments
Bruno Cardoso Lopes [Tue, 24 Aug 2010 01:16:15 +0000 (01:16 +0000)]
Use pshufhw and pshuflw in more cases and fix getTargetShuffleNode number of arguments

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

13 years agoAdd comments for what the condition code symbols mean.
Bill Wendling [Tue, 24 Aug 2010 01:11:30 +0000 (01:11 +0000)]
Add comments for what the condition code symbols mean.

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

13 years agoUpdate comment.
Eric Christopher [Tue, 24 Aug 2010 01:10:52 +0000 (01:10 +0000)]
Update comment.

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

13 years agollvmc: Improve error handling in EmitEdgeClasses().
Mikhail Glushenkov [Tue, 24 Aug 2010 01:10:22 +0000 (01:10 +0000)]
llvmc: Improve error handling in EmitEdgeClasses().

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

13 years agoFix the opcode and the operands for the load instruction.
Eric Christopher [Tue, 24 Aug 2010 01:10:04 +0000 (01:10 +0000)]
Fix the opcode and the operands for the load instruction.

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

13 years agoAdd register class hack that needs to go away, but makes it more obvious
Eric Christopher [Tue, 24 Aug 2010 00:50:47 +0000 (00:50 +0000)]
Add register class hack that needs to go away, but makes it more obvious
that it needs to go away.  Use loadRegFromStackSlot where possible.

Also, remember to update the value map.

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

13 years agofix rdar://7997827 - Accept and ignore LL and ULL suffixes on integer literals.
Chris Lattner [Tue, 24 Aug 2010 00:43:25 +0000 (00:43 +0000)]
fix rdar://7997827 - Accept and ignore LL and ULL suffixes on integer literals.

Also fix 0b010 syntax to actually work while we're at it :-)

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

13 years agoAdd some more debugging code, make it more obvious that RegOffset is
Eric Christopher [Tue, 24 Aug 2010 00:07:24 +0000 (00:07 +0000)]
Add some more debugging code, make it more obvious that RegOffset is
getting an address for an object and select some default values.

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

13 years agoRevert r107202. It is not adding any value.
Devang Patel [Tue, 24 Aug 2010 00:06:12 +0000 (00:06 +0000)]
Revert r107202. It is not adding any value.

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

13 years agoDon't need the extra register here.
Eric Christopher [Mon, 23 Aug 2010 23:28:04 +0000 (23:28 +0000)]
Don't need the extra register here.

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

13 years agollvmc: Make syntax more consistent.
Mikhail Glushenkov [Mon, 23 Aug 2010 23:21:23 +0000 (23:21 +0000)]
llvmc: Make syntax more consistent.

CompilationGraph and LanguageMap definitions do not use special syntax anymore.

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

13 years agoLet FE use derived types for DW_TAG_friend.
Devang Patel [Mon, 23 Aug 2010 23:16:25 +0000 (23:16 +0000)]
Let FE use derived types for DW_TAG_friend.
Patch by Alexander Herz!

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