OSDN Git Service
Eli Friedman [Wed, 7 Mar 2012 03:37:32 +0000 (03:37 +0000)]
Missing change in r152106 for TinyPtrVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152201
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 7 Mar 2012 03:22:32 +0000 (03:22 +0000)]
Switch this code to use hash_combine_range rather than incremental calls
to hash_combine. One of the interfaces could already do this, and the
other can just use a small buffer. This is a much more efficient way to
use the hash_combine interface, although I don't have any particular
benchmark where this code was hot, so I can't measure much of an impact.
It at least doesn't slow anything down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152200
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 7 Mar 2012 02:33:09 +0000 (02:33 +0000)]
Cache the sized-ness of struct types, once we reach the steady state of
"is sized". This prevents every query to isSized() from recursing over
every sub-type of a struct type. This could get *very* slow for
extremely deep nesting of structs, as in 177.mesa.
This change is a 45% speedup for 'opt -O2' of 177.mesa.linked.bc, and
likely a significant speedup for other cases as well. It even impacts
-O0 cases because so many part of the code try to check whether a type
is sized.
Thanks for the review from Nick Lewycky and Benjamin Kramer on IRC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152197
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 7 Mar 2012 02:33:06 +0000 (02:33 +0000)]
Remove an accidental cut/paste of a comment into the middle of
a function. Dunno how I missed this when going through code...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152196
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 7 Mar 2012 02:27:53 +0000 (02:27 +0000)]
No functionality change. Type::isSized() can be expensive, so avoid calling it
until after other inexpensive tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152195
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 7 Mar 2012 01:09:17 +0000 (01:09 +0000)]
ARM pre-v6 assembly parsing for umull/smull.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152188
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 7 Mar 2012 00:52:41 +0000 (00:52 +0000)]
ARM pre-v6 alias for 'nop' to 'mov r0, r0'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152185
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 7 Mar 2012 00:52:39 +0000 (00:52 +0000)]
Tidy up. Remove dead code that slipped into previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152184
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Mar 2012 00:18:27 +0000 (00:18 +0000)]
Added -view-background to avoid waiting for each GraphViz invocation.
GV and XDOT paths are untested but should work the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152179
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Mar 2012 00:18:25 +0000 (00:18 +0000)]
Added -view-misched=dags options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152178
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Mar 2012 00:18:22 +0000 (00:18 +0000)]
Cleanup in preparation for misched: Move DAG visualization logic.
Soon, ScheduleDAG will not refer to the BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152177
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Mar 2012 00:18:18 +0000 (00:18 +0000)]
Added MachineBasicBlock::getFullName() to standardize/factor codegen diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152176
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Mar 2012 00:18:15 +0000 (00:18 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152175
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Mar 2012 00:18:12 +0000 (00:18 +0000)]
Cleanup: DAG building is specific to either SD or MI scheduling. Not part of the target interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152174
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Mar 2012 00:18:08 +0000 (00:18 +0000)]
misched comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152173
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Mar 2012 00:18:05 +0000 (00:18 +0000)]
misched: Use the StartBlock/FinishBlock hooks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152172
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 7 Mar 2012 00:15:19 +0000 (00:15 +0000)]
Add the DW_AT_APPLE_runtime_class attribute to forward declarations
as well as completely defined classes.
This fixes rdar://
10956070
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152171
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 6 Mar 2012 23:33:32 +0000 (23:33 +0000)]
Extend r148086 to check for [r +/- reg] address mode. This fixes queens performance regression (due to increased register pressure from overly aggressive pre-inc formation).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152162
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 6 Mar 2012 23:10:38 +0000 (23:10 +0000)]
ARM more NEON VLD/VST composite physical register refactoring.
Register pair, all lanes subscripting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152157
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 6 Mar 2012 22:27:13 +0000 (22:27 +0000)]
Hoist common code out of if statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152153
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 6 Mar 2012 22:01:44 +0000 (22:01 +0000)]
ARM refactor more NEON VLD/VST instructions to use composite physregs
Register pair VLD1/VLD2 all-lanes instructions. Kill off more of the
pseudos as a result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152150
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 6 Mar 2012 21:48:32 +0000 (21:48 +0000)]
Fix support for encodings up to 64-bits in length. TableGen was silently truncating them to 32-bits prior to this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152148
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 6 Mar 2012 20:40:02 +0000 (20:40 +0000)]
SmallPtrSet: Provide a more efficient implementation of swap than the default triple-copy std::swap.
This currently assumes that both sets have the same SmallSize to keep the implementation simple,
a limitation that can be lifted if someone cares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152143
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 6 Mar 2012 19:58:46 +0000 (19:58 +0000)]
Fix the operand ordering on aliases for shld and shrd. PR12173, part 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152136
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 6 Mar 2012 19:54:44 +0000 (19:54 +0000)]
Add new load commands for MachO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152135
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 6 Mar 2012 19:07:38 +0000 (19:07 +0000)]
build/Darwin: Make it easy to cause all tools to get codesigned (with make CODESIGN_TOOLS=1).
- On OS X 10.7+ this is apparently recommended practice. This maybe should
become a configurey thing one day, but I'm not sure it is right to
automatically turn it on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152133
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 6 Mar 2012 18:59:19 +0000 (18:59 +0000)]
Tidy up. Kill some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152131
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 6 Mar 2012 18:44:11 +0000 (18:44 +0000)]
Allow the same types in DPair as in QPR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152129
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 6 Mar 2012 18:33:12 +0000 (18:33 +0000)]
Fix a bug in the ARM disassembly of the neon VLD2 all lanes instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152127
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 6 Mar 2012 16:41:49 +0000 (16:41 +0000)]
Convert PowerPC to register mask operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152122
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 6 Mar 2012 13:32:36 +0000 (13:32 +0000)]
Remove excess const, a const_iterator shouldn't be const itself.
Fixes 1242 warnings from gcc during clang build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152120
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 6 Mar 2012 10:43:52 +0000 (10:43 +0000)]
Change ConstantAggrUniqueMap to use Chandler's new hashing
implementation. Patch by Meador Inge
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152116
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 6 Mar 2012 09:23:25 +0000 (09:23 +0000)]
Add column width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152115
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 6 Mar 2012 09:22:03 +0000 (09:22 +0000)]
Remove short tag marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152114
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 6 Mar 2012 09:20:59 +0000 (09:20 +0000)]
Appease the HTML validation gods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152113
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 6 Mar 2012 09:17:39 +0000 (09:17 +0000)]
Fix validation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152112
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 6 Mar 2012 09:17:04 +0000 (09:17 +0000)]
Fix validation errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152111
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 6 Mar 2012 08:59:13 +0000 (08:59 +0000)]
Add missing end tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152110
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 6 Mar 2012 07:14:58 +0000 (07:14 +0000)]
[TinyPtrVector] Add erase method and const-goodness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152107
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 6 Mar 2012 07:14:54 +0000 (07:14 +0000)]
PointerUnion::getAddrOf() does not need to be template since we can only
use the first pointer type for it. Rename it to getAddrOfPtr1().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152106
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Mar 2012 06:04:39 +0000 (06:04 +0000)]
Use uint16_t to store indices into string table since C++ only allows 64K string literals so the index into the big string can never be larger than that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152105
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 6 Mar 2012 04:39:52 +0000 (04:39 +0000)]
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
Craig Topper [Tue, 6 Mar 2012 03:44:22 +0000 (03:44 +0000)]
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
Craig Topper [Tue, 6 Mar 2012 03:28:45 +0000 (03:28 +0000)]
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
Argyrios Kyrtzidis [Tue, 6 Mar 2012 03:02:16 +0000 (03:02 +0000)]
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
Jakob Stoklund Olesen [Tue, 6 Mar 2012 02:48:17 +0000 (02:48 +0000)]
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
Eric Christopher [Tue, 6 Mar 2012 02:25:41 +0000 (02:25 +0000)]
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
Eric Christopher [Tue, 6 Mar 2012 02:25:38 +0000 (02:25 +0000)]
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
Eric Christopher [Tue, 6 Mar 2012 02:25:36 +0000 (02:25 +0000)]
Delete trailing whitespace to clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152092
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 6 Mar 2012 02:08:48 +0000 (02:08 +0000)]
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
Evan Cheng [Tue, 6 Mar 2012 02:00:52 +0000 (02:00 +0000)]
Avoid finalizeBundles infinite looping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152089
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 6 Mar 2012 00:29:31 +0000 (00:29 +0000)]
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
Lang Hames [Tue, 6 Mar 2012 00:19:55 +0000 (00:19 +0000)]
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
Eli Friedman [Mon, 5 Mar 2012 23:22:40 +0000 (23:22 +0000)]
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
Jim Grosbach [Mon, 5 Mar 2012 23:16:31 +0000 (23:16 +0000)]
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
Jim Grosbach [Mon, 5 Mar 2012 23:09:51 +0000 (23:09 +0000)]
Nuke a bit of dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152067
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 5 Mar 2012 23:09:40 +0000 (23:09 +0000)]
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
Jim Grosbach [Mon, 5 Mar 2012 21:43:40 +0000 (21:43 +0000)]
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
Jim Grosbach [Mon, 5 Mar 2012 21:09:58 +0000 (21:09 +0000)]
ARM Remove a bit of dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152061
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 5 Mar 2012 19:33:30 +0000 (19:33 +0000)]
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
Jim Grosbach [Mon, 5 Mar 2012 19:33:24 +0000 (19:33 +0000)]
MCRegisterInfo-ize getMatchingSuperReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152044
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 5 Mar 2012 19:33:20 +0000 (19:33 +0000)]
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
Bill Wendling [Mon, 5 Mar 2012 19:29:36 +0000 (19:29 +0000)]
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
Chad Rosier [Mon, 5 Mar 2012 19:27:12 +0000 (19:27 +0000)]
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
Jakob Stoklund Olesen [Mon, 5 Mar 2012 19:10:13 +0000 (19:10 +0000)]
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
Sebastian Pop [Mon, 5 Mar 2012 17:39:52 +0000 (17:39 +0000)]
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
Sebastian Pop [Mon, 5 Mar 2012 17:39:47 +0000 (17:39 +0000)]
fix typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152035
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Pop [Mon, 5 Mar 2012 17:39:45 +0000 (17:39 +0000)]
remove spaces on empty lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152034
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Mar 2012 12:49:45 +0000 (12:49 +0000)]
Remove an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152028
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 5 Mar 2012 12:23:00 +0000 (12:23 +0000)]
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
Chandler Carruth [Mon, 5 Mar 2012 11:29:56 +0000 (11:29 +0000)]
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
Chandler Carruth [Mon, 5 Mar 2012 11:29:54 +0000 (11:29 +0000)]
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
Chandler Carruth [Mon, 5 Mar 2012 10:36:16 +0000 (10:36 +0000)]
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
Chandler Carruth [Mon, 5 Mar 2012 09:56:12 +0000 (09:56 +0000)]
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
Craig Topper [Mon, 5 Mar 2012 08:33:33 +0000 (08:33 +0000)]
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
Craig Topper [Mon, 5 Mar 2012 05:37:41 +0000 (05:37 +0000)]
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
Eli Friedman [Mon, 5 Mar 2012 04:31:54 +0000 (04:31 +0000)]
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
Jakob Stoklund Olesen [Sun, 4 Mar 2012 19:19:10 +0000 (19:19 +0000)]
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
Jakob Stoklund Olesen [Sun, 4 Mar 2012 19:19:07 +0000 (19:19 +0000)]
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
Jakob Stoklund Olesen [Sun, 4 Mar 2012 18:40:30 +0000 (18:40 +0000)]
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
Duncan Sands [Sun, 4 Mar 2012 13:25:19 +0000 (13:25 +0000)]
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
Chandler Carruth [Sun, 4 Mar 2012 12:02:57 +0000 (12:02 +0000)]
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
Chandler Carruth [Sun, 4 Mar 2012 10:55:27 +0000 (10:55 +0000)]
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
Bill Wendling [Sun, 4 Mar 2012 10:46:01 +0000 (10:46 +0000)]
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
Craig Topper [Sun, 4 Mar 2012 10:43:23 +0000 (10:43 +0000)]
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
Chandler Carruth [Sun, 4 Mar 2012 10:23:15 +0000 (10:23 +0000)]
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
Chandler Carruth [Sun, 4 Mar 2012 10:23:11 +0000 (10:23 +0000)]
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
Craig Topper [Sun, 4 Mar 2012 10:16:38 +0000 (10:16 +0000)]
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
Craig Topper [Sun, 4 Mar 2012 03:33:22 +0000 (03:33 +0000)]
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
Craig Topper [Sun, 4 Mar 2012 02:16:41 +0000 (02:16 +0000)]
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
Benjamin Kramer [Sat, 3 Mar 2012 20:44:43 +0000 (20:44 +0000)]
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
Benjamin Kramer [Sat, 3 Mar 2012 19:13:26 +0000 (19:13 +0000)]
Shrink the asm matcher tables.
- Shrink the opcode field to 16 bits.
- Shrink the AsmVariantID field to 8 bits.
- Store the mnemonic string in a string table, store a 16 bit index.
- Store a pascal-style length byte in the string instead of a null terminator,
so we can avoid calling strlen on every entry we visit during mnemonic search.
Shrinks X86AsmParser.o from 434k to 201k on x86_64 and eliminates relocs from the table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151984
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Mar 2012 19:13:20 +0000 (19:13 +0000)]
StringToOffsetTable: Allow uniquing the first element, add an option to skip appending a terminating null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151983
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 3 Mar 2012 15:04:13 +0000 (15:04 +0000)]
Enable the small vector POD optimization for BitCodeAbbrevOp.
While at it bump the small vector size a bit, it's inside a heap-allocated class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151980
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 3 Mar 2012 14:24:15 +0000 (14:24 +0000)]
Correctly initialize LineSectionSymbol. Thanks to Duncan Sands for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151979
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 3 Mar 2012 13:30:56 +0000 (13:30 +0000)]
Honour --config-prefix also for lit.local.cfg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151977
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sat, 3 Mar 2012 09:39:54 +0000 (09:39 +0000)]
Move the NonPOD struct out of the anonymous namespace instead of adding llvm:: everywhere to fix the HashingTest on MSVC .
chandlerc proposed this better solution on IRC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151974
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 3 Mar 2012 09:36:58 +0000 (09:36 +0000)]
Include cctype for isdigit. Patch by Stephen Hines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151973
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Sat, 3 Mar 2012 07:56:49 +0000 (07:56 +0000)]
Fixes the Hashing tests on MSVC by adding llvm:: prefix to hash_value function call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151971
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 3 Mar 2012 07:00:58 +0000 (07:00 +0000)]
unittests/ADT/HashingTest.cpp: Temporarily disable a new test introduced in r151891, to appease msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151970
91177308-0d34-0410-b5e6-
96231b3b80d8