oota-llvm.git
14 years agoUpdate according to feedback.
Eric Christopher [Wed, 23 Jun 2010 20:49:35 +0000 (20:49 +0000)]
Update according to feedback.

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

14 years agoAdd an extra-library-path option to the plugin. This is used to support
Rafael Espindola [Wed, 23 Jun 2010 20:20:59 +0000 (20:20 +0000)]
Add an extra-library-path option to the plugin. This is used to support
having a library both as bitcode and native code. We want to use the
bitcode first, but if codegen produces new undefined references we have to use
the native code to satisfy those references.

Gold has no notion of bitcode and native search directories, so instead it has
an API where the plugin can instruct it to look for the libraries it is passing
to it. This patch uses that API.

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

14 years agoAdd AVX SHUF{PS,PD}{rr,rm} instructions
Bruno Cardoso Lopes [Wed, 23 Jun 2010 20:07:15 +0000 (20:07 +0000)]
Add AVX SHUF{PS,PD}{rr,rm} instructions

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

14 years agoAdd support for the x86 instructions "pusha" and "popa".
Nico Weber [Wed, 23 Jun 2010 20:00:58 +0000 (20:00 +0000)]
Add support for the x86 instructions "pusha" and "popa".

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

14 years agoFix a tblgen bug.
Bruno Cardoso Lopes [Wed, 23 Jun 2010 19:50:39 +0000 (19:50 +0000)]
Fix a tblgen bug.

Given the pattern below as an example:
list<dag> Pattern = [(set RC:$dst, (v4f32 (shufp:src3 RC:$src1,
                            (mem_frag addr:$src2))))];

The right reference resolving should lead to:
list<dag> Pattern = [(set VR128:$dst, (v4f32 (shufp:src3 VR128:$src1,
                            (mem_frag addr:$src2))))];
But was yielding:
list<dag> Pattern = [(set VR128:$dst, (v4f32 (shufp VR128:$src1,
                            (mem_frag addr:$src2))))];

Fix this by passing the right name when creating a new DagInit node.

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

14 years agoReinstate correct test, remove the real invalidated test.
Dale Johannesen [Wed, 23 Jun 2010 18:56:06 +0000 (18:56 +0000)]
Reinstate correct test, remove the real invalidated test.

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

14 years agoRemove tests invalidated by previous checkin.
Dale Johannesen [Wed, 23 Jun 2010 18:53:12 +0000 (18:53 +0000)]
Remove tests invalidated by previous checkin.

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

14 years agoDo not do tail calls to external symbols. If the
Dale Johannesen [Wed, 23 Jun 2010 18:52:34 +0000 (18:52 +0000)]
Do not do tail calls to external symbols.  If the
branch turns out to be ARM-to-Thumb or vice versa
the linker cannot resolve this.  8120438.

If this optimization is going to be useful we probably
need a compiler flag "assume callees are same architecture"
or something like that.

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

14 years agoMorphNodeTo doesn't preserve the memory operands. Because we're morphing a node
Bill Wendling [Wed, 23 Jun 2010 18:16:24 +0000 (18:16 +0000)]
MorphNodeTo doesn't preserve the memory operands. Because we're morphing a node
into the same node, but with different non-memory operands, we need to replace
the memory operands after it's finished morphing.

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

14 years agotests: Tweak lit.cfg to fix breakage with out-of-dir lookup.
Daniel Dunbar [Wed, 23 Jun 2010 18:06:16 +0000 (18:06 +0000)]
tests: Tweak lit.cfg to fix breakage with out-of-dir lookup.

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

14 years agoRevert r106263, "Fold the ShrinkDemandedOps pass into the regular DAGCombiner pass...
Daniel Dunbar [Wed, 23 Jun 2010 17:09:26 +0000 (17:09 +0000)]
Revert r106263, "Fold the ShrinkDemandedOps pass into the regular DAGCombiner pass,"... it was causing both 'file' (with clang) and 176.gcc (with llvm-gcc) to be miscompiled.

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

14 years agoThe generic DAG combiner can now fold atomic fences when needed, so switch
Jim Grosbach [Wed, 23 Jun 2010 16:25:07 +0000 (16:25 +0000)]
The generic DAG combiner can now fold atomic fences when needed, so switch
to using that.

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

14 years agoWhen using libcall expansions for the atomic intrinsics, the explicit
Jim Grosbach [Wed, 23 Jun 2010 16:08:49 +0000 (16:08 +0000)]
When using libcall expansions for the atomic intrinsics, the explicit
MEMBARRIER fences aren't necessary for ARM. Tell the combiner to fold them
away.

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

14 years agoSome targets don't require the fencing MEMBARRIER instructions surrounding
Jim Grosbach [Wed, 23 Jun 2010 16:07:42 +0000 (16:07 +0000)]
Some targets don't require the fencing MEMBARRIER instructions surrounding
atomic intrinsics, either because the use locking instructions for the
atomics, or because they perform the locking directly. Add support in the
DAG combiner to fold away the fences.

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

14 years agoremove trailing whitespace
Jim Grosbach [Wed, 23 Jun 2010 15:49:18 +0000 (15:49 +0000)]
remove trailing whitespace

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

14 years agoAdd a few VNInfo data structure checks.
Jakob Stoklund Olesen [Wed, 23 Jun 2010 15:34:36 +0000 (15:34 +0000)]
Add a few VNInfo data structure checks.

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

14 years agouse ArgOperand accessors
Gabor Greif [Wed, 23 Jun 2010 13:56:57 +0000 (13:56 +0000)]
use ArgOperand accessors

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

14 years agouse ArgOperand accessors
Gabor Greif [Wed, 23 Jun 2010 13:09:06 +0000 (13:09 +0000)]
use ArgOperand accessors

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

14 years agouse helper to neatly access arguments
Gabor Greif [Wed, 23 Jun 2010 08:45:32 +0000 (08:45 +0000)]
use helper to neatly access arguments

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

14 years agoUpdate uses, defs, and comments for darwin tls patterns.
Eric Christopher [Wed, 23 Jun 2010 08:01:49 +0000 (08:01 +0000)]
Update uses, defs, and comments for darwin tls patterns.

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

14 years agoDon't link against libm and libpthread which don't exist in BeOS/Haiku. Also,
Nick Lewycky [Wed, 23 Jun 2010 06:48:34 +0000 (06:48 +0000)]
Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also,
Haiku like Linux provides <regex.h>, so use it. Patch by Paul Davey!

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

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