Commit Graph

80939 Commits

Author SHA1 Message Date
Craig Topper
904a01820c Add asserts to ensure that values will fit into the tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152104 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 04:39:52 +00:00
Craig Topper
aff18aee56 Increase number of allowed registers in register classes to 64k instead of 256. Widen register class ID to 16-bits. Widen register size and alignment to be up to 64k bytes instead of 256 bytes. This partially reverts r152019 to be less restrictive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152100 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 03:44:22 +00:00
Craig Topper
696f5ab12e Revert r152016 and allow overlap, sub, super register tables to be more than 64k entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152099 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 03:28:45 +00:00
Argyrios Kyrtzidis
e196633cfd Remove UsuallyTinyPtrVector.
It is just a worse version of TinyPtrVector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152097 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 03:02:16 +00:00
Jakob Stoklund Olesen
3247af2949 Add <imp-def> operands when reloading into physregs.
When an instruction only writes sub-registers, it is still necessary to
add an <imp-def> operand for the super-register.  When reloading into a
virtual register, rewriting will add the operand, but when loading
directly into a virtual register, the <imp-def> operand is still
necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152095 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 02:48:17 +00:00
Eric Christopher
5b7634fd74 Fix up link and a couple small edits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152094 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 02:25:41 +00:00
Eric Christopher
25e6329e68 Add the beginnings of documentation for the Name Accelerator Tables.
Based on a writeup originally by Greg Clayton.

Abuse div and pre tags horribly. Needs a bit more cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152093 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 02:25:38 +00:00
Eric Christopher
fc7243a1f6 Delete trailing whitespace to clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152092 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 02:25:36 +00:00
Argyrios Kyrtzidis
bae75596ae Add include/llvm/ADT/UsuallyTinyPtrVector.h which is a vector that
optimizes the case where there is only one element.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152090 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 02:08:48 +00:00
Evan Cheng
8250d7385a Avoid finalizeBundles infinite looping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152089 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 02:00:52 +00:00
Owen Anderson
afd3d56b9d Make it possible for a target to mark FSUB as Expand. This requires providing a default expansion (FADD+FNEG), and teaching DAGCombine not to form FSUBs post-legalize if they are not legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152079 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 00:29:31 +00:00
Lang Hames
4f92b5e616 Split fpscr into two registers: FPSCR and FPSCR_NZCV.
The fpscr register contains both flags (set by FP operations/comparisons) and
control bits. The control bits (FPSCR) should be reserved, since they're always
available and needn't be defined before use. The flag bits (FPSCR_NZCV) should
like to be unreserved so they can be hoisted by MachineCSE. This fixes PR12165.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152076 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06 00:19:55 +00:00
Eli Friedman
923bb4117a A few more cases of missing masking in ComputeMaskedBits; found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152070 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 23:22:40 +00:00
Jim Grosbach
bc978a60d9 ARM vpush/vpop assembler mnemonics accept an optional size suffix.
rdar://10988114

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152068 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 23:16:31 +00:00
Jim Grosbach
7cc0426489 Nuke a bit of dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152067 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 23:09:51 +00:00
Eli Friedman
049d08f5c9 Make sure we don't return bits outside the mask in ComputeMaskedBits. PR12189.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152066 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 23:09:40 +00:00
Jim Grosbach
c3384c93c0 ARM Refactor VLD/VST spaced pair instructions.
Use the new composite physical registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152063 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 21:43:40 +00:00
Jim Grosbach
af9f4bc752 ARM Remove a bit of dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152061 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 21:09:58 +00:00
Jim Grosbach
28f08c93e7 ARM refactor away a bunch of VLD/VST pseudo instructions.
With the new composite physical registers to represent arbitrary pairs
of DPR registers, we don't need the pseudo-registers anymore. Get rid of
a bunch of them that use DPR register pairs and just use the real
instructions directly instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152045 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 19:33:30 +00:00
Jim Grosbach
33ca87affb MCRegisterInfo-ize getMatchingSuperReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152044 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 19:33:24 +00:00
Jim Grosbach
c6449b636f Make MCRegisterInfo available to the the MCInstPrinter.
Used to allow context sensitive printing of super-register or sub-register
references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152043 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 19:33:20 +00:00
Bill Wendling
c27faccb3c Fix warnings about adding a bool to a string.
Patch by Sean Silva!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152042 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 19:29:36 +00:00
Chad Rosier
c8d7eea264 Address Evan's comments for r151877.
Specifically, remove the magic number when checking to see if the copy has a 
glue operand and simplify the checking logic.

rdar://10930395


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152041 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 19:27:12 +00:00
Jakob Stoklund Olesen
af71f16f93 Remove a test case that no longer makes sense.
This was testing the handling of sub-register coalescing followed by
remat.  The original problem was caused by the extra <imp-def> operands
added by sub-register coalescing.  Those <imp-def> operands are not
added any longer, and the test case passes even when the original patch
is reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152040 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 19:10:13 +00:00
Sebastian Pop
74bebde7c4 updated patch for the ARM fused multiply add/sub
In this update:
- I assumed neon2 does not imply vfpv4, but neon and vfpv4 imply neon2.
- I kept setting .fpu=neon-vfpv4 code attribute because that is what the
assembler understands.

Patch by Ana Pazos <apazos@codeaurora.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 17:39:52 +00:00
Sebastian Pop
43ec0f4921 fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152035 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 17:39:47 +00:00
Sebastian Pop
3706ac7aa8 remove spaces on empty lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152034 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 17:39:45 +00:00
Nadav Rotem
7eb0bf5fb7 Remove an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152028 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 12:49:45 +00:00
Duncan Sands
8d12f72c11 This is not a common case, in fact it never happens!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152027 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 12:23:00 +00:00
Chandler Carruth
e5121f2e22 Switch mem2reg to use the new hashing infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152026 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 11:29:56 +00:00
Chandler Carruth
16003d0c0c Replace the ad-hoc hashing in GVN with the new hashing infrastructure.
This implicitly fixes a nasty bug in the GVN hashing (that thankfully
could only manifest as a performance bug): actually include the opcode
in the hash. The old code started the hash off with the opcode, but then
overwrote it with the type pointer.

Since this is likely to be pretty hot (GVN being already pretty
expensive) I've included a micro-optimization to just not bother with
the varargs hashing if they aren't present. I can't measure any change
in GVN performance due to this, even with a big test case like Duncan's
sqlite one. Everything I see is in the noise floor. That said, this
closes a loop hole for a potential scaling problem due to collisions if
the opcode were the differentiating aspect of the expression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152025 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 11:29:54 +00:00
Chandler Carruth
c78bd9ba6b Switch the TableGen record's string-based DenseMap key to use the new
hashing infrastructure. I wonder why we don't just use StringMap here,
and I may revisit the issue if I have time, but for now I'm just trying
to consolidate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152023 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 10:36:16 +00:00
Chandler Carruth
179bc7cb59 Switch to a C-style cast here to silence a brain-dead MSVC warning. It
complains about the truncation of a 64-bit constant to a 32-bit value
when size_t is 32-bits wide, but *only with static_cast*!!! The exact
signal that should *silence* such a warning, and in fact does silence it
with both GCC and Clang.

Anyways, this was causing grief for all the MSVC builds, so pointless
change made. Thanks to Nikola on IRC for confirming that this works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152021 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 09:56:12 +00:00
Craig Topper
52b89dd303 Shrink and reorder fields in MCRegisterClass to reduce size of static data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152019 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 08:33:33 +00:00
Craig Topper
9ebfbf8b9f Convert more GenRegisterInfo tables from unsigned to uint16_t to reduce static data size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152016 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 05:37:41 +00:00
Eli Friedman
ec93b6deca Make aliases for shld and shrd match gas. PR12173.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152014 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05 04:31:54 +00:00
Jakob Stoklund Olesen
92b7df07af Stop fixing bad machine code in LiveIntervalAnalysis.
The first def of a virtual register cannot also read the register.
Assert on such bad machine code instead of trying to fix it.
TwoAddressInstructionPass should never create code like that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152010 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 19:19:10 +00:00
Jakob Stoklund Olesen
8d9c3a4ee7 Stop adding <imp-def> operands when coalescing sub-registers.
We are already setting <undef> flags, and that is good enough. The
<imp-def> operands don't mean anything any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152009 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 19:19:07 +00:00
Jakob Stoklund Olesen
fce711cb65 Use <def,undef> operands when spilling NEON bundles.
MachineOperands that define part of a virtual register must have an
<undef> flag if they are not intended as read-modify-write operands.

The old trick of adding an <imp-def> operand doesn't work any longer.

Fixes PR12177.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152008 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 18:40:30 +00:00
Duncan Sands
190e5a3314 Nick pointed out on IRC that GVN's propagateEquality wasn't propagating
equalities into phi node operands for which the equality is known to
hold in the incoming basic block.  That's because replaceAllDominatedUsesWith
wasn't handling phi nodes correctly in general (that this didn't give wrong
results was just luck: the specific way GVN uses replaceAllDominatedUsesWith
precluded wrong changes to phi nodes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152006 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 13:25:19 +00:00
Chandler Carruth
ed7692a136 Replace the hashing functions on APInt and APFloat with overloads of the
new hash_value infrastructure, and replace their implementations using
hash_combine. This removes a complete copy of Jenkin's lookup3 hash
function (which is both significantly slower and lower quality than the
one implemented in hash_combine) along with a somewhat scary xor-only
hash function.

Now that APInt and APFloat can be passed directly to hash_combine,
simplify the rest of the LLVMContextImpl hashing to use the new
infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152004 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 12:02:57 +00:00
Chandler Carruth
528f0bbe19 Add generic support for hashing StringRef objects using the new hashing library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152003 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 10:55:27 +00:00
Bill Wendling
e3e394d982 Do trivial CSE of dead BBs during codegen preparation.
Some BBs can become dead after codegen preparation. If we delete them here, it
could help enable tail-call optimizations later on.
<rdar://problem/10256573>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152002 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 10:46:01 +00:00
Craig Topper
e4fd907e72 Use uint16_t to store register overlaps to reduce static data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152001 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 10:43:23 +00:00
Chandler Carruth
9406da6e66 Teach the hashing facilities how to hash std::string objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152000 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 10:23:15 +00:00
Chandler Carruth
21d60d5161 Split this test up into two smaller, and more focused tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151999 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 10:23:11 +00:00
Craig Topper
b6632ba380 Use uint16_t instead of unsigned to store registers in reg classes. Reduces static data size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151998 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 10:16:38 +00:00
Craig Topper
015f228861 Use uint16_t to store registers in callee saved register tables to reduce size of static data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151996 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 03:33:22 +00:00
Craig Topper
991271d9c4 Use uint8_t instead of enums to store values in X86 disassembler table. Shaves 150k off the size of X86DisassemblerDecoder.o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151995 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-04 02:16:41 +00:00
Benjamin Kramer
b08bb34a6f Perform the string table optimization for OperandMatchEntries too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151986 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-03 20:44:43 +00:00