oota-llvm.git
14 years agoRevert r106066, "Create a more targeted fix for not sinking instructions into a range...
Daniel Dunbar [Wed, 23 Jun 2010 00:48:25 +0000 (00:48 +0000)]
Revert r106066, "Create a more targeted fix for not sinking instructions into a range where it"... it causes bzip2 to be miscompiled by Clang.

Conflicts:

lib/CodeGen/MachineSink.cpp

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

14 years agoLess incorrect handling of zero-length bitfields. Radars 7992077 and 8093043.
Stuart Hastings [Wed, 23 Jun 2010 00:31:14 +0000 (00:31 +0000)]
Less incorrect handling of zero-length bitfields.  Radars 7992077 and 8093043.

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

14 years agoGet the addend correct for i386 pic.
Eric Christopher [Tue, 22 Jun 2010 23:51:47 +0000 (23:51 +0000)]
Get the addend correct for i386 pic.

Thanks Daniel!

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

14 years agoGenerate DWARF information during Apple-style build. They'll be stripped out
Bill Wendling [Tue, 22 Jun 2010 23:44:15 +0000 (23:44 +0000)]
Generate DWARF information during Apple-style build. They'll be stripped out
later on. But we need them saved in the symbols directory.

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

14 years agoReplace ScalarEvolution's private copy of getLoopPredecessor
Dan Gohman [Tue, 22 Jun 2010 23:43:28 +0000 (23:43 +0000)]
Replace ScalarEvolution's private copy of getLoopPredecessor
with LoopInfo's public copy.

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

14 years agoAdd AVX compare packed instructions
Bruno Cardoso Lopes [Tue, 22 Jun 2010 23:37:59 +0000 (23:37 +0000)]
Add AVX compare packed instructions

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

14 years agoLoosen up this test so that it doesn't depend as much on register
Dan Gohman [Tue, 22 Jun 2010 23:32:47 +0000 (23:32 +0000)]
Loosen up this test so that it doesn't depend as much on register
allocation details.

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

14 years agoRevert 106592 for now. It causes clang-selfhost build failure.
Devang Patel [Tue, 22 Jun 2010 23:29:55 +0000 (23:29 +0000)]
Revert 106592 for now. It causes clang-selfhost build failure.

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

14 years agoFix OptimizeMax to handle an odd case where one of the max operands
Dan Gohman [Tue, 22 Jun 2010 23:07:13 +0000 (23:07 +0000)]
Fix OptimizeMax to handle an odd case where one of the max operands
is another max which folds. This fixes PR7454.

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

14 years agoReapply support for AVX unpack and interleave instructions, with
Bruno Cardoso Lopes [Tue, 22 Jun 2010 23:02:38 +0000 (23:02 +0000)]
Reapply support for AVX unpack and interleave instructions, with
testcases this time.

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

14 years agoIf a metadata operand is seeded in value map and the metadata should also be seeded...
Devang Patel [Tue, 22 Jun 2010 22:53:21 +0000 (22:53 +0000)]
If a metadata operand is seeded in value map and the metadata should also be seeded in value map. This is not limited to function local metadata.

Failure to seed metdata in such cases causes troubles when in a cloned module, metadata from a new module refers to values in old module. Usually this results in mysterious bugpoint crashes. For example,

 Checking to see if we can delete global inits: Unknown constant!
 UNREACHABLE executed at /d/g/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:904!

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

14 years agoWhile cloning a module, clone metadata attached with instructions.
Devang Patel [Tue, 22 Jun 2010 22:50:42 +0000 (22:50 +0000)]
While cloning a module, clone metadata attached with instructions.

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

14 years agoAdd AVX MOV{SS,SD}{rr,rm} instructions
Bruno Cardoso Lopes [Tue, 22 Jun 2010 22:38:56 +0000 (22:38 +0000)]
Add AVX MOV{SS,SD}{rr,rm} instructions

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

14 years agoFix the formatting of the switch statement and add a missing break.
Bill Wendling [Tue, 22 Jun 2010 22:16:17 +0000 (22:16 +0000)]
Fix the formatting of the switch statement and add a missing break.

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

14 years agoAlso convert SUBREG_TO_REG to a KILL when relevant, like the other subreg
Jakob Stoklund Olesen [Tue, 22 Jun 2010 22:11:07 +0000 (22:11 +0000)]
Also convert SUBREG_TO_REG to a KILL when relevant, like the other subreg
instructions.

This does not affect codegen much because SUBREG_TO_REG is only used by X86 and
X86 does not use the register scavenger, but it prevents verifier errors.

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

14 years agoThumb1 functions using @llvm.returnaddress were not saving the incoming LR.
Bob Wilson [Tue, 22 Jun 2010 22:04:24 +0000 (22:04 +0000)]
Thumb1 functions using @llvm.returnaddress were not saving the incoming LR.
Radar 8031193.

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

14 years agoMove a 64-bit test to the 64-bit file. Fixes an llvm-mc assertion
Eric Christopher [Tue, 22 Jun 2010 21:11:51 +0000 (21:11 +0000)]
Move a 64-bit test to the 64-bit file.  Fixes an llvm-mc assertion
during test runs.

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

14 years agoLook for and use a different darwin crash reporter library.
Eric Christopher [Tue, 22 Jun 2010 21:01:04 +0000 (21:01 +0000)]
Look for and use a different darwin crash reporter library.

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

14 years agoAdd SSE so these actually pass on non-X86 hosts.
Dale Johannesen [Tue, 22 Jun 2010 20:54:03 +0000 (20:54 +0000)]
Add SSE so these actually pass on non-X86 hosts.

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

14 years agofix typo
Jim Grosbach [Tue, 22 Jun 2010 20:52:02 +0000 (20:52 +0000)]
fix typo

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

14 years agouse high-level accessors
Gabor Greif [Tue, 22 Jun 2010 20:40:38 +0000 (20:40 +0000)]
use high-level accessors

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

14 years agoFix a subtle multiclass bug: when using class inheritance on
Bruno Cardoso Lopes [Tue, 22 Jun 2010 20:30:50 +0000 (20:30 +0000)]
Fix a subtle multiclass bug: when using class inheritance on
a toplevel 'defm', make sure to properly resolve references.

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

14 years agoCorresponding test changes for r106564.
Bill Wendling [Tue, 22 Jun 2010 20:30:14 +0000 (20:30 +0000)]
Corresponding test changes for r106564.

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

14 years agowarmup ritual: use high-level argument accessors
Gabor Greif [Tue, 22 Jun 2010 19:46:37 +0000 (19:46 +0000)]
warmup ritual: use high-level argument accessors

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

14 years agoMove v-binop-widen tests to X86 since they don't work on all platforms
Mon P Wang [Tue, 22 Jun 2010 19:40:50 +0000 (19:40 +0000)]
Move v-binop-widen tests to X86 since they don't work on all platforms

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

14 years agoClone named metadata while cloning a module.
Devang Patel [Tue, 22 Jun 2010 18:52:38 +0000 (18:52 +0000)]
Clone named metadata while cloning a module.
Reapply Bob's patch.

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

14 years agoReorganize logical and arithmetic SSE 1 & 2 instructions
Bruno Cardoso Lopes [Tue, 22 Jun 2010 18:17:40 +0000 (18:17 +0000)]
Reorganize logical and arithmetic SSE 1 & 2 instructions

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

14 years agoReorganize SSE instructions, making easier to see oportunities for refactoring
Bruno Cardoso Lopes [Tue, 22 Jun 2010 18:09:32 +0000 (18:09 +0000)]
Reorganize SSE instructions, making easier to see oportunities for refactoring

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

14 years agoMove PHIElimination's SplitCriticalEdge for MachineBasicBlocks out
Dan Gohman [Tue, 22 Jun 2010 17:25:57 +0000 (17:25 +0000)]
Move PHIElimination's SplitCriticalEdge for MachineBasicBlocks out
into a utility routine, teach it how to update MachineLoopInfo, and
make use of it in MachineLICM to split critical edges on demand.

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

14 years agoRemove the SimpleJoin optimization from SimpleRegisterCoalescing.
Jakob Stoklund Olesen [Tue, 22 Jun 2010 16:13:57 +0000 (16:13 +0000)]
Remove the SimpleJoin optimization from SimpleRegisterCoalescing.

Measurements show that it does not speed up coalescing, so there is no reason
the keep the added complexity around.

Also clean out some unused methods and static functions.

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

14 years agoSplit out the code for finding a unique loop predecessor from
Dan Gohman [Tue, 22 Jun 2010 15:25:42 +0000 (15:25 +0000)]
Split out the code for finding a unique loop predecessor from
getLoopPreheader into a separate function, for clients which don't
require a proper preheader.

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

14 years agoUse pre-increment instead of post-increment when the result is not used.
Dan Gohman [Tue, 22 Jun 2010 15:08:57 +0000 (15:08 +0000)]
Use pre-increment instead of post-increment when the result is not used.

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

14 years agoAdd a comment explaining a non-obvious API.
Dan Gohman [Tue, 22 Jun 2010 13:57:08 +0000 (13:57 +0000)]
Add a comment explaining a non-obvious API.

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

14 years agoAdd an explicit keyword.
Dan Gohman [Tue, 22 Jun 2010 13:53:29 +0000 (13:53 +0000)]
Add an explicit keyword.

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

14 years agoAllow "exhaustive" trip count evaluation on phi nodes with all
Dan Gohman [Tue, 22 Jun 2010 13:15:46 +0000 (13:15 +0000)]
Allow "exhaustive" trip count evaluation on phi nodes with all
constant operands.

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

14 years agoRevert 106528. It is causing self host failures.
Devang Patel [Tue, 22 Jun 2010 06:14:09 +0000 (06:14 +0000)]
Revert 106528. It is causing self host failures.

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

14 years agoDo not rely on DenseMap slot which can be easily invalidated when DenseMap grows.
Devang Patel [Tue, 22 Jun 2010 05:16:56 +0000 (05:16 +0000)]
Do not rely on DenseMap slot which can be easily invalidated when DenseMap grows.

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

14 years agoRevert my change to clone named metadata. Buildbots are complaining.
Bob Wilson [Tue, 22 Jun 2010 02:08:51 +0000 (02:08 +0000)]
Revert my change to clone named metadata.  Buildbots are complaining.

--- Reverse-merging r106508 into '.':
U    lib/Transforms/Utils/CloneModule.cpp

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

14 years agoWhen unfolding a load, avoid assuming which instruction that
Dan Gohman [Tue, 22 Jun 2010 02:07:21 +0000 (02:07 +0000)]
When unfolding a load, avoid assuming which instruction that
kill and dead flags will end up on.

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

14 years agoUse single interface, using twine, to get named metadata.
Devang Patel [Tue, 22 Jun 2010 01:19:38 +0000 (01:19 +0000)]
Use single interface, using twine, to get named metadata.
getNamedMetadata().

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

14 years agoTail merging pass shall not break up IT blocks. rdar://8115404
Evan Cheng [Tue, 22 Jun 2010 01:18:16 +0000 (01:18 +0000)]
Tail merging pass shall not break up IT blocks. rdar://8115404

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

14 years agoDiscard special LLVM prefix from linkage name.
Devang Patel [Tue, 22 Jun 2010 01:06:05 +0000 (01:06 +0000)]
Discard special LLVM prefix from linkage name.

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

14 years agoDo not rely on Twine temporaries to survive.
Devang Patel [Tue, 22 Jun 2010 01:01:58 +0000 (01:01 +0000)]
Do not rely on Twine temporaries to survive.

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

14 years agomake sure to initialize indent_level
Chris Lattner [Tue, 22 Jun 2010 00:40:26 +0000 (00:40 +0000)]
make sure to initialize indent_level

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

14 years agoFix the new load-unfolding code to update LiveVariable's dead flags,
Dan Gohman [Tue, 22 Jun 2010 00:32:04 +0000 (00:32 +0000)]
Fix the new load-unfolding code to update LiveVariable's dead flags,
in addition to the kill flags.

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

14 years agoInclude named metadata when cloning a module.
Bob Wilson [Tue, 22 Jun 2010 00:11:03 +0000 (00:11 +0000)]
Include named metadata when cloning a module.

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

14 years agoFix typo.
Eric Christopher [Mon, 21 Jun 2010 23:49:08 +0000 (23:49 +0000)]
Fix typo.

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

14 years agoadd some support for blockaddress. This isn't really enough to be useful,
Chris Lattner [Mon, 21 Jun 2010 23:19:36 +0000 (23:19 +0000)]
add some support for blockaddress.  This isn't really enough to be useful,
but it will cover uses of blockaddress that are actually in a function.

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

14 years agoeliminate a mutable global variable, use raw_ostream::indent instead of
Chris Lattner [Mon, 21 Jun 2010 23:14:47 +0000 (23:14 +0000)]
eliminate a mutable global variable, use raw_ostream::indent instead of
rolling our own.

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

14 years agoun-indent a huge amount of code out of an anonymous namespace.
Chris Lattner [Mon, 21 Jun 2010 23:12:56 +0000 (23:12 +0000)]
un-indent a huge amount of code out of an anonymous namespace.

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

14 years agorevert r106482
Bruno Cardoso Lopes [Mon, 21 Jun 2010 22:59:03 +0000 (22:59 +0000)]
revert r106482

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

14 years agofix several bugs in the tutorial, patch by Kevin Kelley!
Chris Lattner [Mon, 21 Jun 2010 22:51:14 +0000 (22:51 +0000)]
fix several bugs in the tutorial, patch by Kevin Kelley!

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

14 years agoTeach two-address lowering how to unfold a load to open up commuting
Dan Gohman [Mon, 21 Jun 2010 22:17:20 +0000 (22:17 +0000)]
Teach two-address lowering how to unfold a load to open up commuting
opportunities. For example, this lets it emit this:

   movq (%rax), %rcx
   addq %rdx, %rcx

instead of this:

   movq %rdx, %rcx
   addq (%rax), %rcx

in the case where %rdx has subsequent uses. It's the same number
of instructions, and usually the same encoding size on x86, but
it appears faster, and in general, it may allow better scheduling
for the load.

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

14 years agochange parameter name to avoid confusion with global definition
Bruno Cardoso Lopes [Mon, 21 Jun 2010 21:28:07 +0000 (21:28 +0000)]
change parameter name to avoid confusion with global definition

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

14 years agosign_extend_inreg needs to be expanded for pre-v6 Thumb as well as ARM.
Bob Wilson [Mon, 21 Jun 2010 21:27:34 +0000 (21:27 +0000)]
sign_extend_inreg needs to be expanded for pre-v6 Thumb as well as ARM.
Radar 8104310.

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

14 years agoLEApcrelJT shouldn't be marked as neverHasSideEffects, as we don't want it
Jim Grosbach [Mon, 21 Jun 2010 21:27:27 +0000 (21:27 +0000)]
LEApcrelJT shouldn't be marked as neverHasSideEffects, as we don't want it
being moved around away from the jump table it references. rdar://8104340

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

14 years agoAdd unpack and interleave AVX instructions, encoding tests cooming soon
Bruno Cardoso Lopes [Mon, 21 Jun 2010 21:21:48 +0000 (21:21 +0000)]
Add unpack and interleave AVX instructions, encoding tests cooming soon

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

14 years agoFix PR7421: bug in kill transferring logic. It was ignoring loads / stores which...
Evan Cheng [Mon, 21 Jun 2010 21:21:14 +0000 (21:21 +0000)]
Fix PR7421: bug in kill transferring logic. It was ignoring loads / stores which have already been processed.

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

14 years agoThis makes example Makefile a lot more like actual
Chris Lattner [Mon, 21 Jun 2010 20:36:09 +0000 (20:36 +0000)]
This makes example Makefile a lot more like actual
lib/Transforms/Hello/Makefile, and prevents a lot of errors like "Assertion
`Inserted && "Pass registered multiple times!"' failed"

Patch by Gregory Petrosyan!

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

14 years agoRemove isTwoAddress from llvm.
Eric Christopher [Mon, 21 Jun 2010 20:35:09 +0000 (20:35 +0000)]
Remove isTwoAddress from llvm.

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

14 years ago"This is just a cosmetic change in MCAsmStreamer.cpp/EmitSymbolAttribute: all attribu...
Chris Lattner [Mon, 21 Jun 2010 20:35:01 +0000 (20:35 +0000)]
"This is just a cosmetic change in MCAsmStreamer.cpp/EmitSymbolAttribute: all attributes have now a \t before and after, as done for '.type'.

This makes the output look consistent, as well as help some third party assemblers expecting the attributes to be in the second column."

Patch by Arnaud de Grandmaison!

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

14 years agofix typos reported by Adam Warner!
Chris Lattner [Mon, 21 Jun 2010 20:31:30 +0000 (20:31 +0000)]
fix typos reported by Adam Warner!

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

14 years agoRemove isTwoAddress from SystemZ.
Eric Christopher [Mon, 21 Jun 2010 20:25:57 +0000 (20:25 +0000)]
Remove isTwoAddress from SystemZ.

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

14 years agoRemove isTwoAddress from Sparc.
Eric Christopher [Mon, 21 Jun 2010 20:22:35 +0000 (20:22 +0000)]
Remove isTwoAddress from Sparc.

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

14 years agoRemove isTwoAddress from Mips.
Eric Christopher [Mon, 21 Jun 2010 20:19:21 +0000 (20:19 +0000)]
Remove isTwoAddress from Mips.

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

14 years agoRemove isTwoAddress from Blackfin.
Eric Christopher [Mon, 21 Jun 2010 20:13:37 +0000 (20:13 +0000)]
Remove isTwoAddress from Blackfin.

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

14 years agoRemove isTwoAddress from MSP430.
Eric Christopher [Mon, 21 Jun 2010 20:07:30 +0000 (20:07 +0000)]
Remove isTwoAddress from MSP430.

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

14 years agoMake this test more robust in case LLVM ever decides to align the global
Dan Gohman [Mon, 21 Jun 2010 19:56:27 +0000 (19:56 +0000)]
Make this test more robust in case LLVM ever decides to align the global
variable differently.

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

14 years agoUse A.append(...) instead of A.insert(A.end(), ...) when A is a
Dan Gohman [Mon, 21 Jun 2010 19:47:52 +0000 (19:47 +0000)]
Use A.append(...) instead of A.insert(A.end(), ...) when A is a
SmallVector, and other SmallVector simplifications.

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

14 years agoMake 80-column.
Eric Christopher [Mon, 21 Jun 2010 18:56:55 +0000 (18:56 +0000)]
Make 80-column.

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

14 years agoRemove isTwoAddress from PIC16.
Eric Christopher [Mon, 21 Jun 2010 18:55:01 +0000 (18:55 +0000)]
Remove isTwoAddress from PIC16.

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

14 years agoRemove isTwoAddress from XCore.
Eric Christopher [Mon, 21 Jun 2010 18:51:38 +0000 (18:51 +0000)]
Remove isTwoAddress from XCore.

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

14 years agoRemove isTwoAddress from Alpha.
Eric Christopher [Mon, 21 Jun 2010 18:48:55 +0000 (18:48 +0000)]
Remove isTwoAddress from Alpha.

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

14 years agoMove several non-performance-critical member functinos out of line.
Dan Gohman [Mon, 21 Jun 2010 18:46:45 +0000 (18:46 +0000)]
Move several non-performance-critical member functinos out of line.

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

14 years agoAdd missing FileCheck call.
Dale Johannesen [Mon, 21 Jun 2010 18:46:08 +0000 (18:46 +0000)]
Add missing FileCheck call.

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

14 years agotest case for r106438.
Devang Patel [Mon, 21 Jun 2010 18:37:23 +0000 (18:37 +0000)]
test case for r106438.

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

14 years agoDo not directly use function names to construct new name for named metadata.
Devang Patel [Mon, 21 Jun 2010 18:36:58 +0000 (18:36 +0000)]
Do not directly use function names to construct new name for named metadata.
"llvm.dbg.lv.~A" is not a valid name.

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

14 years agoMove part of SSE 1 & 2 compare, shuffle and unpack instructions closely. Preparing...
Bruno Cardoso Lopes [Mon, 21 Jun 2010 18:36:04 +0000 (18:36 +0000)]
Move part of SSE 1 & 2 compare, shuffle and unpack instructions closely. Preparing them for refactoring and to the addition of their AVX forms

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

14 years agoAdd AVX regular (non-aliased ones) and,or,xor,andn packed instructions. They are...
Bruno Cardoso Lopes [Mon, 21 Jun 2010 18:22:54 +0000 (18:22 +0000)]
Add AVX regular (non-aliased ones) and,or,xor,andn packed instructions. They are already tested in the MC framework, no test needed

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

14 years agoFix PR 7433. Silly typo in non-Darwin ARM tail call
Dale Johannesen [Mon, 21 Jun 2010 18:21:49 +0000 (18:21 +0000)]
Fix PR 7433.  Silly typo in non-Darwin ARM tail call
handling, plus correct R9 handling in that mode.

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

14 years agoAdd some codegen patterns for x86_64-linux-gnu tls codegen matching.
Eric Christopher [Mon, 21 Jun 2010 18:21:27 +0000 (18:21 +0000)]
Add some codegen patterns for x86_64-linux-gnu tls codegen matching.

Based on a patch by Patrick Marlier!

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

14 years agoearly exit for dbg_value instructions
Jim Grosbach [Mon, 21 Jun 2010 17:49:23 +0000 (17:49 +0000)]
early exit for dbg_value instructions

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

14 years agoremove some dead variables reported by clang++
Chris Lattner [Mon, 21 Jun 2010 17:20:18 +0000 (17:20 +0000)]
remove some dead variables reported by clang++

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

14 years agomake the Value constructor protected.
Chris Lattner [Mon, 21 Jun 2010 16:46:37 +0000 (16:46 +0000)]
make the Value constructor protected.

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

14 years agoRevert r106422, which is breaking the non-fast-isel path.
Dan Gohman [Mon, 21 Jun 2010 16:02:28 +0000 (16:02 +0000)]
Revert r106422, which is breaking the non-fast-isel path.

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

14 years agoMore changes for non-top-down fast-isel.
Dan Gohman [Mon, 21 Jun 2010 15:13:54 +0000 (15:13 +0000)]
More changes for non-top-down fast-isel.

Split the code for materializing a value out of
SelectionDAGBuilder::getValue into a helper function, so that it can
be used in other ways. Add a new getNonRegisterValue function which
uses it, for use in code which doesn't want a CopyFromReg even
when FuncMap.ValueMap already has an entry for it.

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

14 years agoAdd the check to the testcase of r106419.
Kalle Raiskila [Mon, 21 Jun 2010 15:11:51 +0000 (15:11 +0000)]
Add the check to the testcase of r106419.

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

14 years agoMark the SPU 'lr' instruction to never have side effects.
Kalle Raiskila [Mon, 21 Jun 2010 15:08:16 +0000 (15:08 +0000)]
Mark the SPU 'lr' instruction to never have side effects.
This allows the fast regiser allocator to remove redundant
register moves.
Update a set of tests that depend on the register allocator
to be linear scan.

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

14 years agoFix the lowering of VECTOR_SHUFFLE on SPU to handle splats.
Kalle Raiskila [Mon, 21 Jun 2010 14:42:19 +0000 (14:42 +0000)]
Fix the lowering of VECTOR_SHUFFLE on SPU to handle splats.

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

14 years agoDo one lookup instead of two.
Dan Gohman [Mon, 21 Jun 2010 14:21:47 +0000 (14:21 +0000)]
Do one lookup instead of two.

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

14 years agoGeneralize this to look in the regular ValueMap in addition to
Dan Gohman [Mon, 21 Jun 2010 14:17:46 +0000 (14:17 +0000)]
Generalize this to look in the regular ValueMap in addition to
the LocalValueMap, to make it more flexible when fast-isel isn't
proceding straight top-down.

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

14 years agoFix an unintentional commit. I think I typed "git svn dcommit" in the wrong branch.
Rafael Espindola [Mon, 21 Jun 2010 13:31:32 +0000 (13:31 +0000)]
Fix an unintentional commit. I think I typed "git svn dcommit" in the wrong branch.

I was trying to do some refactoring on the copyRegToReg, but this is realyl a work in progress and not generally useful yet.

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

14 years agoFix lowering of VECTOR_SHUFFLE on SPU. Old algorithm
Kalle Raiskila [Mon, 21 Jun 2010 10:17:36 +0000 (10:17 +0000)]
Fix lowering of VECTOR_SHUFFLE on SPU. Old algorithm
used to choke llc with the attached test.

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

14 years agoadd_input_file and add_input_library now take const arguments, remove the
Rafael Espindola [Mon, 21 Jun 2010 02:23:12 +0000 (02:23 +0000)]
add_input_file and add_input_library now take const arguments, remove the
const_cast.

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

14 years agoSave more temps with -save-temps.
Rafael Espindola [Mon, 21 Jun 2010 02:17:36 +0000 (02:17 +0000)]
Save more temps with -save-temps.

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

14 years agowip
Rafael Espindola [Mon, 21 Jun 2010 02:17:34 +0000 (02:17 +0000)]
wip

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

14 years agoAdd support for returning multiple vectors via sret, which is how the ARM target...
Nate Begeman [Sun, 20 Jun 2010 21:09:52 +0000 (21:09 +0000)]
Add support for returning multiple vectors via sret, which is how the ARM target expects the intrinsics to work.

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

14 years agoFix warning in no-asserts build.
Nick Lewycky [Sun, 20 Jun 2010 20:27:42 +0000 (20:27 +0000)]
Fix warning in no-asserts build.

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

14 years agoFix a crash caused by dereference of MBB.end(). rdar://8110842
Evan Cheng [Sun, 20 Jun 2010 00:54:38 +0000 (00:54 +0000)]
Fix a crash caused by dereference of MBB.end(). rdar://8110842

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

14 years agoRestore a call to rememberInstruction which was accidentally dropped
Dan Gohman [Sat, 19 Jun 2010 22:50:35 +0000 (22:50 +0000)]
Restore a call to rememberInstruction which was accidentally dropped
in refactoring.

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