Commit Graph

68256 Commits

Author SHA1 Message Date
Wesley Peck
59b4127029 Reverting commit to LLVMLibDeps that was inadvertently done in 121649.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 22:28:51 +00:00
Wesley Peck
8f40b24ca1 MBlaze delay slot filler was not capable of using ADDK and variants to fill delay slots. This broke several test cases when 121649 was committed. This fixes the regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121650 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 22:22:49 +00:00
Wesley Peck
a7c7b9dccb The ADD and ADDK (and all variants) instructions where flip-flopped in the MBlaze backend. This bug fix makes 64-bit math work on the MBlaze backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 22:02:31 +00:00
Tobias Grosser
d713acb631 Remove useless dynamic_cast<>().
Thanks Peter for pointing me to something that should have never been
committed to the llvm code base.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121648 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 21:58:28 +00:00
Peter Collingbourne
2bf4b54a80 Regen configure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 21:42:01 +00:00
Peter Collingbourne
1fbf5a492e Fix paths; AutoRegen.sh changes its current working directory to be the
autoconf directory, but these paths need to be relative to the main
source directory.  Patch originally by Dan Gohman, r67655.

Also, cause configure.ac to find absolute paths to LLVM source and
object trees.   Together, fixes PR1220.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 21:41:56 +00:00
Wesley Peck
eb13382333 1. Change MBlaze indirect branches to use absolute branch BRALD instead of pc relative branch BRLD.
2. Make sure that the MBlaze stack is aligned to 4-byte boundaries.
3. Determine frame indexes that should be placed in the callers stack frame, as per the MBlaze ABI, and place them in the correct locations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 20:52:31 +00:00
Duncan Sands
a30b7d2c70 Catch attempts to remove a deleted node from the CSE maps. Better to
catch this here rather than later after accessing uninitialized memory
etc.  Fires when compiling the testcase in PR8237.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121635 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 13:22:50 +00:00
Chris Lattner
7138863603 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121620 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-12 02:42:57 +00:00
Benjamin Kramer
2f7228b80c Generalize the and-icmp-select instcombine further by allowing selects of the form
(x & 2^n) ? 2^m+C : C

we can offset both arms by C to get the "(x & 2^n) ? 2^m : 0" form, optimize the
select to a shift and apply the offset afterwards.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121609 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-11 10:49:22 +00:00
Benjamin Kramer
20e3b4b380 Factor the (x & 2^n) ? 2^m : 0 instcombine into its own method and generalize it
to catch cases where n != m with a shift.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121608 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-11 09:42:59 +00:00
Evan Cheng
a9688c4b57 (or (and (shl A, #shamt), mask), B) => ARMbfi B, A, ~mask where lsb(mask) == #shamt. rdar://8752056
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-11 04:11:38 +00:00
Jakob Stoklund Olesen
533f58ecdd Add named timer groups for the different stages of register allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121604 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-11 00:19:56 +00:00
Jakob Stoklund Olesen
4680dec5fb Move MRI into RegAllocBase. Clean up debug output a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121599 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 23:49:00 +00:00
Jim Grosbach
092e2cd569 Add FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121598 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 23:41:10 +00:00
Nick Lewycky
a0bb037283 Remove extraneous close parenthesis.
Fix build breakage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 23:14:35 +00:00
Nick Lewycky
5a4308bca8 Move variable that's unused in an NDEBUG build inside the DEBUG() macro, fixing
lib/CodeGen/RegAllocGreedy.cpp:233: error: unused variable 'TRC' [-Wunused-variable]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 23:05:10 +00:00
Owen Anderson
63ee22065d Attempt to get Thumb2 branch fixups working properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121593 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 23:02:28 +00:00
Jakob Stoklund Olesen
f6dff84d4e Force the greedy register allocator to always use the inline spiller.
Soon, RegAllocGreedy will start splitting live ranges, and then deferred
spilling won't work anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121591 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:54:44 +00:00
Jakob Stoklund Olesen
3bda29eb4f Rip out live range splitting support from the inline spiller.
The spiller should only spill. The register allocator will drive live range
splitting, it has the needed information about register pressure and
interferences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121590 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:54:40 +00:00
Bill Wendling
ab7837c269 Get rid of ellipses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121589 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:54:30 +00:00
Owen Anderson
5fd873d8e8 Fix merge error in my last fix to Thumb2 vldr fixups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121588 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:53:48 +00:00
Owen Anderson
e2e0f58809 Fixups for Thumb2 vldr's need to have the effective PC aligned as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121587 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:46:47 +00:00
Bill Wendling
1591b293d6 The MCFixupKindInfo table needs to be in the order that the enums were
declared. Add a note specifying this and spruce up the list a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121586 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:37:19 +00:00
Owen Anderson
ac00e96273 Provide the necessary post-encoder hook for Thumb2 encodings of VMOV and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:32:08 +00:00
Jakob Stoklund Olesen
dd479e9769 Use AllocationOrder in RegAllocGreedy, fix a bug in the hint calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121584 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:21:05 +00:00
Bob Wilson
746fa17d59 Add float patterns for Neon vld1-lane/dup and vst1-lane operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:13:32 +00:00
Bob Wilson
20d5515aa5 Remove unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:13:24 +00:00
Owen Anderson
0f4b60d43a Fix encoding of Thumb1 LDRB and STRB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 22:11:13 +00:00
Jim Grosbach
7bf4c02789 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121580 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 21:57:34 +00:00
Owen Anderson
808c7d1482 Fix Thumb2 encodings of STREX and LDREX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121579 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 21:52:38 +00:00
Dan Gohman
839c092548 Revert r121520, which may have introduced miscompilations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121573 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 21:48:28 +00:00
Jim Grosbach
0be099da79 Correct encoding of rotation immediate for Thumb2 instructions. rdar://8755999
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121525 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 21:24:18 +00:00
Jim Grosbach
90cc533fda Fix encoding of 'U' bit for Thumb2 STRD/LDRD instructions. rdar://8755726
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121524 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 21:05:07 +00:00
Jim Grosbach
683fc3e9af More trivial cleanup. No need to define the EncoderMethod property type. Can
just assign to it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 20:53:44 +00:00
Jim Grosbach
04da9bf9f1 Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121522 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 20:51:35 +00:00
Jim Grosbach
a79bd0e1e0 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121521 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 20:47:29 +00:00
Dan Gohman
3bd5e52676 Implement PartialAlias checking in BasicAA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 20:47:03 +00:00
Jakob Stoklund Olesen
6ce219ec64 Fix miscompilation caused by trivial logic error in the reassignVReg()
interference check.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121519 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 20:45:04 +00:00
Dan Gohman
d891acd184 Minimally update this code to handle PartialAlias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 20:14:49 +00:00
Dan Gohman
4a2a3eab2d Use PartialAlias to do better noalias lint checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 20:04:06 +00:00
Dan Gohman
91d747569a Teach AliasAnalysisCounter about PartialAlias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:53:05 +00:00
Dan Gohman
3d9f1ca5af Teach AliasAnalysisEvaluator about PartialAlias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121512 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:52:40 +00:00
Dan Gohman
2c2f4c8247 Update this code to handle PartialAlias as MayAlias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:40:47 +00:00
Dan Gohman
4a34cbd2b9 Introduce a new PartialAlias response for AliasAnalysis. For most
AliasAnalysis consumers, PartialAlias will be treated as MayAlias.

For AliasAnalysis chaining, MayAlias says "procede to the next analysis".
PartialAlias will be used to indicate that the query should terminate,
even though it didn't reach MustAlias or NoAlias.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121507 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:38:58 +00:00
Bob Wilson
a92bac64cb Fix some invalid alignments for Neon vld-dup and vld/st-lane instructions.
Alignments smaller than the total size of the memory being loaded or stored,
unless the alignment is 8 bytes, are not allowed.  Add tests for this, too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121506 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 19:37:42 +00:00
Jim Grosbach
568f528c99 Teach isCSRestore() that ARM/Thumb2 functions will use post-modify LDR
instructions to restore a single register rather than an LDM instruction.
rdar://8754999

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 18:41:15 +00:00
Jakob Stoklund Olesen
c9672cb8be Add an AllocationOrder class that can iterate over the allocatable physical
registers for a given virtual register.

Reserved registers are filtered from the allocation order, and any valid hint is
returned as the first suggestion.

For target dependent hints, a number of arcane target hooks are invoked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121497 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 18:36:02 +00:00
Jim Grosbach
e246717c3a Thumb unconditional branch binary encoding. rdar://8754994
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 18:21:33 +00:00
Jim Grosbach
0108645139 Thumb conditional branch binary encodings. rdar://8745367
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 17:13:40 +00:00