1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

75567 Commits

Author SHA1 Message Date
Jim Grosbach
7482c11b79 Thumb2 assembly parsing and encoding for LDRB(register).
llvm-svn: 139266
2011-09-07 23:17:00 +00:00
Jim Grosbach
a3ff9eeb85 Thumb2 assembly parsing and encoding for LDR(register).
llvm-svn: 139264
2011-09-07 23:10:15 +00:00
Benjamin Kramer
f4e9cbfc05 Add two notes for correlated-expression optimizations.
llvm-svn: 139263
2011-09-07 22:49:26 +00:00
Jakob Stoklund Olesen
6853bdde5b Revert r139247 "Cache intermediate results during traceSiblingValue."
It broke the self host and clang-x86_64-darwin10-RA.

llvm-svn: 139259
2011-09-07 21:43:52 +00:00
Jim Grosbach
d640c62856 Thumb2 assembly parsing and encoding for LDRB(immediate).
llvm-svn: 139258
2011-09-07 21:41:25 +00:00
Jim Grosbach
deb3c78242 Thumb2 assembly parsing and encoding for LDR(literal).
Need branch relocation support to distinguish this encoding from the
16-bit Thumb1 encoding w/o the explicit .w suffix. That comes later, though.

llvm-svn: 139257
2011-09-07 21:33:16 +00:00
Owen Anderson
26467730c1 Create Thumb2 versions of STC/LDC, and reenable the relevant tests.
llvm-svn: 139256
2011-09-07 21:10:42 +00:00
Jim Grosbach
53b836a088 Add tests for Thumb2 LDR(immediate) from r139254.
llvm-svn: 139255
2011-09-07 21:06:46 +00:00
Jim Grosbach
20642fb479 Thumb2 parsing and encoding for LDR(immediate).
The immediate offset of the non-writeback i8 form (encoding T4) allows
negative offsets only. The positive offset form of the encoding is the
LDRT instruction. Immediate offsets in the range [0,255] use encoding T3
instead.

llvm-svn: 139254
2011-09-07 20:58:57 +00:00
Jim Grosbach
054b346e46 Thumb2 parsing and encoding for LDMDB.
llvm-svn: 139251
2011-09-07 19:57:53 +00:00
James Molloy
ac057f13a5 Second of a three-patch series aiming to fix MSR/MRS on Cortex-M. This adds predicate checking to the Disassembler.
llvm-svn: 139250
2011-09-07 19:42:28 +00:00
Jakob Stoklund Olesen
46444bd655 Cache intermediate results during traceSiblingValue.
In some cases such as interpreters using indirectbr, the CFG can be very
complicated, and live range splitting may be forced to insert a large
number of phi-defs.  When that happens, traceSiblingValue can spend a
lot of time zipping around in the CFG looking for defs and reloads.

This patch causes more information to be cached in SibValues, and the
cached values are used to terminate searches early.  This speeds up
spilling by 20x in one interpreter test case.  For more typical code,
this is just a 10% speedup of spilling.

llvm-svn: 139247
2011-09-07 19:07:31 +00:00
Eli Friedman
9ea5599729 Fix atomic load and store on x86 to pass -verify-machineinstrs (and possibly fix some subtle bugs involving passes which check mayStore()).
This isn't exactly ideal, but it is good enough for the moment.

llvm-svn: 139245
2011-09-07 18:48:32 +00:00
Jim Grosbach
f5f321c4ce Update test for 139243
llvm-svn: 139244
2011-09-07 18:40:06 +00:00
Jim Grosbach
bd018fd94f Thumb2 ldm/stm 'db' mnemonics don't have a '.w' suffix.
There is no 16-bit wide encoding, so the .w suffix isn't needed (indeed, isn't
documented as allowed). Also add the missing '!' token on the _UPD
variant.

llvm-svn: 139243
2011-09-07 18:39:47 +00:00
Jim Grosbach
20689d28e7 Thumb2 parsing and encoding for LDMIA.
Choose 32-bit vs. 16-bit encoding when there's no .w suffix in post-processing
as match classes are insufficient to handle the context-sensitiveness of
the writeback operand's legality for the 16-bit encodings.

llvm-svn: 139242
2011-09-07 18:05:34 +00:00
Owen Anderson
4106b9fb31 Port more assembler tests over to disassembler tests, and fix a minor logic error that exposed.
llvm-svn: 139240
2011-09-07 17:55:19 +00:00
James Molloy
f781d3d8e9 Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= handling to llvm-mc. Reviewed by Owen Anderson.
llvm-svn: 139237
2011-09-07 17:24:38 +00:00
Duncan Sands
b027f19035 When inlining exception handling code into another function, ensure that
duplicate tests are eliminated (for example if the two functions both have
a catch clause catching the same type, ensure the redundant one is removed).
Note that it would probably be safe to say that eh.typeid.for is 'const',
but since two calls to it with the same argument can give different results
(but only if the calls are in different functions), it seems more correct to
mark it only 'pure'; this doesn't get in the way of the optimization.

llvm-svn: 139236
2011-09-07 16:44:14 +00:00
Jim Grosbach
c0ebdea61f Thumb2 use 'ldm' as default mnemonic.
Handle explicit 'ia' suffix via a MnemonicAlias (pre-existing).

llvm-svn: 139234
2011-09-07 16:22:42 +00:00
Rafael Espindola
1cca4f99bd Detect attempt to use segmented stacks on non ELF systems and error
(not assert) early.

llvm-svn: 139233
2011-09-07 16:10:57 +00:00
Jim Grosbach
7969f880c0 Better diagnostic location information for mnemonic suffices.
llvm-svn: 139232
2011-09-07 16:06:04 +00:00
Duncan Sands
8df5170d0d Another forgotten trampoline testcase.
llvm-svn: 139230
2011-09-07 10:05:14 +00:00
Duncan Sands
ccd8b589f7 Forgot to add this trampoline testcase.
llvm-svn: 139229
2011-09-07 09:21:38 +00:00
Eli Friedman
6a45370c0f Relax the MemOperands on atomics a bit. Fixes -verify-machineinstrs failures for atomic laod/store on ARM.
(The fix for the related failures on x86 is going to be nastier because we actually need Acquire memoperands attached to the atomic load instrs, etc.)

llvm-svn: 139221
2011-09-07 02:23:42 +00:00
Joerg Sonnenberger
9fa9ed6961 Dependency should be on the output file name, not the dependency file
name.

llvm-svn: 139220
2011-09-07 02:12:03 +00:00
Devang Patel
f4483238b6 While sinking machine instructions, sink matching DBG_VALUEs also otherwise live debug variable pass will drop DBG_VALUEs on the floor.
llvm-svn: 139208
2011-09-07 00:07:58 +00:00
Bill Wendling
763ed58408 Reenable compact unwind by default. However, also emit the old version of unwind
information for older linkers.

llvm-svn: 139206
2011-09-06 23:47:14 +00:00
Owen Anderson
9ae90800a2 memset_pattern16 uses a 16 BYTE pattern, not a 16 BIT pattern. Add comments to that effect.
llvm-svn: 139205
2011-09-06 23:43:26 +00:00
Owen Anderson
483f94e8d1 Teach BasicAA about the aliasing properties of memset_pattern16.
Fixes PR10872 and <rdar://problem/10065079>.

llvm-svn: 139204
2011-09-06 23:33:25 +00:00
Jim Grosbach
2b87e14298 ISB is HasDB, not just HasV7.
llvm-svn: 139202
2011-09-06 23:09:19 +00:00
Jim Grosbach
14720bed32 Thumb2 parsing and encoding for ISB.
llvm-svn: 139200
2011-09-06 22:53:27 +00:00
Jim Grosbach
521a061450 Thumb2 parsing and encoding for EOR.
llvm-svn: 139199
2011-09-06 22:44:50 +00:00
Jim Grosbach
463bf279d6 Thumb2 parsing and encoding for DSB.
llvm-svn: 139194
2011-09-06 22:19:40 +00:00
Jim Grosbach
276e51888c Thumb2 parsing and encoding for DMB.
llvm-svn: 139193
2011-09-06 22:14:58 +00:00
Nick Lewycky
4e3daabb26 Disable these tests harder. They're XFAIL'd, but that means they still run, and
these tests all infinitely recurse, bringing my system down into swapping hell.

llvm-svn: 139192
2011-09-06 22:08:18 +00:00
Jim Grosbach
c0aaa747a1 Thumb2 parsing and encoding for DBG.
llvm-svn: 139191
2011-09-06 22:06:40 +00:00
Jim Grosbach
4258d5ffba Thumb2 parsing and encoding for CMN and CMP.
llvm-svn: 139188
2011-09-06 21:44:58 +00:00
Nick Lewycky
8203bcfd03 This transform only handles two-operand AddRec's. Prevent it from trying to
handle anything more complex. Fixes PR10383 again!

llvm-svn: 139186
2011-09-06 21:42:18 +00:00
Eli Friedman
33a078523a Add mayLoad/mayStore markings to ARM 64-bit atomic pseudo-instructions.
llvm-svn: 139179
2011-09-06 20:53:37 +00:00
Jim Grosbach
45bc30cc7e Thumb2 parsing and encoding for CLZ.
llvm-svn: 139177
2011-09-06 20:44:17 +00:00
Jim Grosbach
b5dcc965a7 Thumb2 parsing and encoding for CLREX.
llvm-svn: 139172
2011-09-06 20:27:04 +00:00
Owen Anderson
23820ebb17 Port more encoding tests over to Thumb2 decoding tests.
llvm-svn: 139171
2011-09-06 20:26:34 +00:00
Andrew Trick
8145f71bab Add -verify-indvars for imperfect SCEV trip count verification after indvars.
llvm-svn: 139169
2011-09-06 20:20:38 +00:00
Jim Grosbach
3399db069a Thumb2 parsing and encoding for CDP/CDP2.
llvm-svn: 139168
2011-09-06 20:12:23 +00:00
Rafael Espindola
9182560b8f Fix comment. Noticed by Duncan.
llvm-svn: 139161
2011-09-06 19:29:31 +00:00
Duncan Sands
d1311488fe Add codegen support for vector select (in the IR this means a select
with a vector condition); such selects become VSELECT codegen nodes.
This patch also removes VSETCC codegen nodes, unifying them with SETCC
nodes (codegen was actually often using SETCC for vector SETCC already).
This ensures that various DAG combiner optimizations kick in for vector
comparisons.  Passes dragonegg bootstrap with no testsuite regressions
(nightly testsuite as well as "make check-all").  Patch mostly by
Nadav Rotem.

llvm-svn: 139159
2011-09-06 19:07:46 +00:00
Evan Cheng
891e9696ea Fix fall outs from my recent change on how carry bit is modeled during isel.
Now the 'S' instructions, e.g. ADDS, treat S bit as optional operand as well.
Also fix isel hook to correctly set the optional operand.
rdar://10073745

llvm-svn: 139157
2011-09-06 18:52:20 +00:00
Devang Patel
1366637777 Use IRBuilder.
llvm-svn: 139156
2011-09-06 18:49:53 +00:00
Jim Grosbach
86c318e475 ARM .code directive should always go to the streamer.
Even if there's no mode switch performed, the .code directive should still
be sent to the output streamer. Otherwise, for example, an output asm stream
is not equivalent to the input stream which generated it (a dependency on
the input target triple arm vs. thumb is introduced which was not originally
there).

llvm-svn: 139155
2011-09-06 18:46:23 +00:00