Commit Graph

68497 Commits

Author SHA1 Message Date
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
Michael J. Spencer
c8cfbcb99a Another git svn dcommit test. This time let's hope it doesn't kill my repo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 14:45:10 +00:00
Michael J. Spencer
52917e54cf Another git-svn dcommit test. (last time I got access and client errors and it broke everything locally;/)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 14:27:18 +00:00
Michael J. Spencer
d15e2f72db Test git svn dcommit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121483 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 13:44:26 +00:00
Anton Korobeynikov
bbee05522b Another dummy commit to check GIT mirroring
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 11:49:22 +00:00
Anton Korobeynikov
1b6135095d Dummy commit to test GIT mirroring
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 11:38:59 +00:00
NAKAMURA Takumi
049c74ba3e macho-dump: Fix CMake build, following up to r121466.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121476 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 09:18:26 +00:00
Rafael Espindola
89b9372605 Fixed version of 121434 with no new memory leaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 07:39:47 +00:00
Bob Wilson
c2ef828616 The Neon vqdmlsl_lane and vqdmlal_lane intrinsics have 4 arguments, not 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 06:37:53 +00:00
Daniel Dunbar
cdffa4fdc9 Mach-O/ARM: Add relocation type enumeration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121467 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-10 06:19:49 +00:00