1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

50344 Commits

Author SHA1 Message Date
Cameron Zwarich
19d2ebc9a4 To find the exiting VN of a LiveInterval from a block, use the previous slot
rather than the previous index. If a block has a single instruction, the
previous index may be in a different basic block.

I have no clue how this used to work on all of test-suite, because now this
failure is seen quite often when trying to compile code with -strong-phi-elim.
This fixes PR10252.

llvm-svn: 141812
2011-10-12 21:24:54 +00:00
Jim Grosbach
422576b6e8 Thumb2 assembly parsing and encoding for LDC/STC.
llvm-svn: 141811
2011-10-12 20:54:17 +00:00
Nick Lewycky
add3022a37 Hoist vector.size() computation out of the loop. No functionality change.
llvm-svn: 141807
2011-10-12 20:20:48 +00:00
Jim Grosbach
71dbc175ce addrmode2 is gone from these, so no need for the reg0 operand.
llvm-svn: 141794
2011-10-12 18:11:24 +00:00
Jim Grosbach
eb7acc978a ARM parsing and encoding for the <option> form of LDC/STC instructions.
llvm-svn: 141786
2011-10-12 17:34:41 +00:00
Jim Grosbach
70a91e2da7 80 columns.
llvm-svn: 141781
2011-10-12 16:36:01 +00:00
Jim Grosbach
3b205dab2d Tidy up. Formatting.
llvm-svn: 141780
2011-10-12 16:34:37 +00:00
Dan Gohman
5acb47274d Fix a thinko that Nick noticed. The previous code actually worked as
intended, but only by accident.

llvm-svn: 141779
2011-10-12 15:56:56 +00:00
NAKAMURA Takumi
35b6744077 lib/Object/ELFObjectFile.cpp: Fix undefined behavior for MC/ELF/many-section.s not to fail (on msvc).
DenseMap::lookup(k) would return "default constructor value" when k was not met. It would be useless when value type were POD.

llvm-svn: 141774
2011-10-12 10:28:55 +00:00
Bill Wendling
bec4f3b9f3 Expand the check for a landing pad so that it looks at the basic block's
containing loop's header to see if that's a landing pad. If it is, then we don't
want to hoist instructions out of the loop and above the header.

llvm-svn: 141767
2011-10-12 02:58:01 +00:00
Jakob Stoklund Olesen
0f662145ef Use an existing function.
llvm-svn: 141763
2011-10-12 01:24:51 +00:00
Akira Hatanaka
68c6bb2c02 Define base class LogicNOR and make 32-bit and 64-bit NOR derive from it.
llvm-svn: 141761
2011-10-12 01:05:13 +00:00
Akira Hatanaka
08230e45e0 Fix encoding of 32-bit integer instructions. Change names of operands and nodes.
Remove unused classes.

llvm-svn: 141757
2011-10-12 00:56:06 +00:00
Nick Lewycky
e7b3961fab Add missing space.
llvm-svn: 141750
2011-10-12 00:14:31 +00:00
Nick Lewycky
e2234c564a Fix indent in comment.
llvm-svn: 141749
2011-10-12 00:14:12 +00:00
Evan Cheng
a4ac173a22 Fix r141744.
1. The speculation check may not have been performed if the BB hasn't had a load
   LICM candidate.
2. If the candidate would be CSE'ed, then go ahead and speculatively LICM the
   instruction even if it's in high register pressure situation.

llvm-svn: 141747
2011-10-12 00:09:14 +00:00
Jakob Stoklund Olesen
2611cc2520 Fix -widen-vmovs liveness issues.
When widening a copy, we are reading a larger register that may not be
live.  Use an <undef> flag to tell the register scavenger and machine
code verifier that we know the value isn't defined.

We now widen:

  %S6<def> = COPY %S4<kill>, %D3<imp-def>

into:

  %D3<def> = VMOVD %D2<undef>, pred:14, pred:%noreg, %S4<imp-use,kill>

This also keeps the <kill> flag on %S4 so we don't inadvertently kill a
live value in %S5.

Finally, ensure that ARMBaseInstrInfo::setExecutionDomain() preserves
the <undef> flag when converting VMOVD to VORR.

llvm-svn: 141746
2011-10-12 00:06:23 +00:00
Evan Cheng
5b4ab71b44 Refine r141689 with a tri-state variable.
Also teach MachineLICM to avoid "speculation" when register pressure is high.

llvm-svn: 141744
2011-10-11 23:48:44 +00:00
Akira Hatanaka
ab6aae33e9 Change name of class to ArithOverflowR.
llvm-svn: 141743
2011-10-11 23:43:48 +00:00
Akira Hatanaka
5273f6aabb Define class ArithLogicI. Make 32-bit and 64-bit arithmetic and logical
instructions with two register operands derive from it.

llvm-svn: 141742
2011-10-11 23:38:52 +00:00
Akira Hatanaka
0d687917ae Fix comment.
llvm-svn: 141737
2011-10-11 23:12:12 +00:00
Akira Hatanaka
12da673e60 Define classes ArithLogicR and ArithLogicOfR and make 32-bit and 64-bit
arithmetic and logical instructions with three register operands derive from
them. Fix instruction encoding too.

llvm-svn: 141736
2011-10-11 23:05:46 +00:00
Eric Christopher
57c57a3260 Add a new wrapper node for a DILexicalBlock that encapsulates it and a
file. Since it should only be used when necessary propagate it through
the backend code generation and tweak testcases accordingly.

This helps with code like in clang's test/CodeGen/debug-info-line.c where
we have multiple #line directives within a single lexical block and want
to generate only a single block that contains each file change.

Part of rdar://10246360

llvm-svn: 141729
2011-10-11 22:59:11 +00:00
Eric Christopher
22773143e0 Formatting.
llvm-svn: 141728
2011-10-11 22:59:04 +00:00
Eric Christopher
a715203dda Spacing.
llvm-svn: 141727
2011-10-11 22:58:58 +00:00
Bill Wendling
f8cd4fcba7 N.B. This is with the new EH scheme:
The blocks with invokes have branches to the dispatch block, because that more
correctly models the behavior of the CFG. The dispatch of course has edges to
the landing pads. Those landing pads could contain invokes, which then have
branches back to the dispatch. This creates a loop. The machine LICM pass looks
at this loop and thinks it can hoist elements out of it. But because the
dispatch is an alternate entry point into the program, the hoisted instructions
won't be executed.

I wasn't able to get a testcase which was small and could reproduce all of the
time. The function_try_block.cpp in llvm-test was where this showed up.

llvm-svn: 141726
2011-10-11 22:42:31 +00:00
Akira Hatanaka
8a43300a4f Fix function isUnalignedLoadStore.
llvm-svn: 141722
2011-10-11 22:04:01 +00:00
Jim Grosbach
d2cfc2b31f ARM assembly parsing and encoding for LDC{2}{L}/STC{2}{L} instructions.
Fill out the rest of the encoding information, update to properly mark
the LDC/STC instructions as predicable while the LDC2/STC2 instructions are
not, and adjust the parser accordingly.

llvm-svn: 141721
2011-10-11 21:55:36 +00:00
Akira Hatanaka
4ea17fffd6 Remove unused PatLeaf.
llvm-svn: 141720
2011-10-11 21:53:08 +00:00
Akira Hatanaka
99550c035f Change the names of 64-bit logical instructions so that they match the names of
the real instructions.

llvm-svn: 141718
2011-10-11 21:48:01 +00:00
Bill Wendling
a1c238d8bf Revert r141529. This is causing failures in the test-suite, like bigstack and ReedSolomon. Boo...
llvm-svn: 141716
2011-10-11 21:40:47 +00:00
Akira Hatanaka
7ae83fe86a Remove redundancy in setcc patterns using multiclass.
llvm-svn: 141715
2011-10-11 21:40:01 +00:00
Cameron Zwarich
fac176ac51 Fix PR11106 by correcting a typo that has been in the code for over a year. This
would have never worked, since the element type of a vector type is never a
vector type. Also fix the conditional to be more direct in checking whether
EltTy is a vector type.

llvm-svn: 141713
2011-10-11 21:26:40 +00:00
Akira Hatanaka
f8aabd951e Use sltiu instead of sltu when a register operand and immediate are compared.
llvm-svn: 141708
2011-10-11 20:44:43 +00:00
Jim Grosbach
66bf42f4bb ARM addressing mode cleanup for LDC/STC.
We parse at least some forms of the instructions now. Encoding is
pretty screwed up, still, though.

llvm-svn: 141704
2011-10-11 20:17:35 +00:00
Daniel Dunbar
48c24625fe Clean up a few references to System/. We still have docs/SystemLibrary.html
lying around...

llvm-svn: 141703
2011-10-11 20:02:52 +00:00
Akira Hatanaka
27c0f84dce Add patterns for conditional branches with 64-bit register operands.
llvm-svn: 141696
2011-10-11 19:09:09 +00:00
Akira Hatanaka
1594be76f8 Add support for 64-bit set-on-less-than instructions.
llvm-svn: 141695
2011-10-11 18:53:46 +00:00
Akira Hatanaka
9df92e48e1 Add support for conditional branch instructions with 64-bit register operands.
llvm-svn: 141694
2011-10-11 18:49:17 +00:00
Devang Patel
3811b42be0 Add dominance check for the instruction being hoisted.
For example, MachineLICM should not hoist a load that is not guaranteed to be executed.
Radar 10254254.

llvm-svn: 141689
2011-10-11 18:09:58 +00:00
Owen Anderson
85292f7b5d Expose MachOObjectFile externally, like we do for COFF. First step in reducing the amount of special-purpose code needed for llvm-objdump.
llvm-svn: 141684
2011-10-11 17:32:27 +00:00
Jim Grosbach
a4d00441c7 ARM parse alignment specifier for NEON load/store instructions.
llvm-svn: 141682
2011-10-11 17:29:55 +00:00
Jim Grosbach
556c9f6f6c ARM Rename operand sub-structure 'Mem' to 'Memory' for a bit more clarity.
llvm-svn: 141671
2011-10-11 15:59:20 +00:00
Nadav Rotem
6ddbd1308b Add support for legalization of vector SHL/SRA/SRL instructions
llvm-svn: 141667
2011-10-11 14:36:35 +00:00
Richard Osborne
ca9b871ab7 Implement the emitFrameIndexDebugValue and getDebugValueLocation hooks.
This fixes an assert due to the operands of the DBG_VALUE instruction not
being as expected (PR11105).

llvm-svn: 141666
2011-10-11 12:55:35 +00:00
Kalle Raiskila
19b09a39e2 Fix a iterator out of bounds error, that triggers rarely.
llvm-svn: 141665
2011-10-11 12:55:18 +00:00
Nadav Rotem
451cacafa0 Add support for legalization of vector trunc-store where the saved scalar type is illegal (for example, v2i16 on systems where the smallest store size is i32)
llvm-svn: 141661
2011-10-11 11:25:16 +00:00
Nadav Rotem
45b5fc0012 Cleanup the trunc-store legalization code and add asserts.
llvm-svn: 141659
2011-10-11 10:04:25 +00:00
Craig Topper
881d972428 Add HasPOPCNT predicate to the POPCNT instructions. Also mark POPCNT as modifying EFLAGS.
llvm-svn: 141656
2011-10-11 07:13:09 +00:00
Craig Topper
db2d702bff Make Ivy Bridge 16-bit floating point conversion instructions require AVX.
llvm-svn: 141654
2011-10-11 07:01:37 +00:00