Commit Graph

61670 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes
0caca3967b 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
2010-06-22 23:02:38 +00:00
Devang Patel
186b3d2606 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
2010-06-22 22:53:21 +00:00
Devang Patel
3bf329f495 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
2010-06-22 22:50:42 +00:00
Bruno Cardoso Lopes
c3d57b179c 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
2010-06-22 22:38:56 +00:00
Bill Wendling
19d8597bca 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
2010-06-22 22:16:17 +00:00
Jakob Stoklund Olesen
f175c5c828 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
2010-06-22 22:11:07 +00:00
Bob Wilson
a3a204664d 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
2010-06-22 22:04:24 +00:00
Eric Christopher
97994e0262 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
2010-06-22 21:11:51 +00:00
Eric Christopher
654dee4875 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
2010-06-22 21:01:04 +00:00
Dale Johannesen
cda351e1b3 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
2010-06-22 20:54:03 +00:00
Jim Grosbach
dd11ee2273 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106574 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 20:52:02 +00:00
Gabor Greif
f2937ac4ed use high-level accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106573 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 20:40:38 +00:00
Bruno Cardoso Lopes
e5104ac99a 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
2010-06-22 20:30:50 +00:00
Bill Wendling
649fa7bad0 Corresponding test changes for r106564.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106569 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 20:30:14 +00:00
Gabor Greif
07f639fca4 warmup ritual: use high-level argument accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106563 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 19:46:37 +00:00
Mon P Wang
23a8fc6e48 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
2010-06-22 19:40:50 +00:00
Devang Patel
d8800e7972 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
2010-06-22 18:52:38 +00:00
Bruno Cardoso Lopes
d3a067bbc2 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
2010-06-22 18:17:40 +00:00
Bruno Cardoso Lopes
f23919b3e9 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
2010-06-22 18:09:32 +00:00
Dan Gohman
853d3fb8d2 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
2010-06-22 17:25:57 +00:00
Jakob Stoklund Olesen
6ff1c3f36c 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
2010-06-22 16:13:57 +00:00
Dan Gohman
5cf27f81f4 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
2010-06-22 15:25:42 +00:00
Dan Gohman
fe60104ac9 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
2010-06-22 15:08:57 +00:00
Dan Gohman
30f30e4386 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
2010-06-22 13:57:08 +00:00
Dan Gohman
455164bdff Add an explicit keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106538 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 13:53:29 +00:00
Dan Gohman
9d4588ffad 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
2010-06-22 13:15:46 +00:00
Devang Patel
e4acff8720 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
2010-06-22 06:14:09 +00:00
Devang Patel
52e0612f7d 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
2010-06-22 05:16:56 +00:00
Bob Wilson
ec68864877 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
2010-06-22 02:08:51 +00:00
Dan Gohman
cc1ca987f3 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
2010-06-22 02:07:21 +00:00
Devang Patel
a762b09310 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
2010-06-22 01:19:38 +00:00
Evan Cheng
4d54e5b2dd 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
2010-06-22 01:18:16 +00:00
Devang Patel
7e1d742e1a Discard special LLVM prefix from linkage name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 01:06:05 +00:00
Devang Patel
d1bbc6b70e 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
2010-06-22 01:01:58 +00:00
Chris Lattner
ceea301c1d make sure to initialize indent_level
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 00:40:26 +00:00
Dan Gohman
7aa7bc735d 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
2010-06-22 00:32:04 +00:00
Bob Wilson
e42f493f4c Include named metadata when cloning a module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 00:11:03 +00:00
Eric Christopher
df7d419f26 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-21 23:49:08 +00:00
Chris Lattner
3284877064 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
2010-06-21 23:19:36 +00:00
Chris Lattner
1018c24c13 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
2010-06-21 23:14:47 +00:00
Chris Lattner
7e6d7451ae 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
2010-06-21 23:12:56 +00:00
Bruno Cardoso Lopes
c27d1e4d17 revert r106482
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106499 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-21 22:59:03 +00:00
Chris Lattner
b0e9eada32 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
2010-06-21 22:51:14 +00:00
Dan Gohman
584fedf188 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
2010-06-21 22:17:20 +00:00
Bruno Cardoso Lopes
b7cc3f6ae6 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
2010-06-21 21:28:07 +00:00
Bob Wilson
56a1a69a35 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
2010-06-21 21:27:34 +00:00
Jim Grosbach
a967d1121a 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
2010-06-21 21:27:27 +00:00
Bruno Cardoso Lopes
b44e8b2d11 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
2010-06-21 21:21:48 +00:00
Evan Cheng
d95ea2da28 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
2010-06-21 21:21:14 +00:00
Chris Lattner
d47397f6dd 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
2010-06-21 20:36:09 +00:00