1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

43552 Commits

Author SHA1 Message Date
Duncan Sands
ef77539014 Add braces, as suggested by a gcc warning.
llvm-svn: 61465
2008-12-29 08:05:02 +00:00
Scott Michel
e555efe94d - Various '#if 0' cleanups.
- Move v4i32, i32 mul into SPUInstrInfo.td, with a few more instruction
  cleanups there as well.
- Make SMUL_LOHI, UMUL_LOHI competely illegal for Cell SPU, to better
  assist Chris to see the problem in bug 3101.

llvm-svn: 61464
2008-12-29 03:23:36 +00:00
Scott Michel
5bb7db3872 Teach LeaglizeDAG that i64 mul can be a libcall.
llvm-svn: 61463
2008-12-29 03:21:37 +00:00
Chris Lattner
befcb38427 select constant exprs should have the same constraints as select instructions,
notably, they should support vectors and aggregates.

llvm-svn: 61462
2008-12-29 00:16:12 +00:00
Chris Lattner
031a666948 move select validation logic into a shared place where the select ctor,
verifier, asm parser, etc can share it.

llvm-svn: 61461
2008-12-29 00:12:50 +00:00
Owen Anderson
e5b1fb3c25 Fix up kill/dead marking in the new live interval reconstruction code.
llvm-svn: 61460
2008-12-28 23:35:13 +00:00
Owen Anderson
4acaef9e5f Forgot to commit this file.
Add a clear() method to remove all ranges and value numbers for a live interval.

llvm-svn: 61459
2008-12-28 21:57:02 +00:00
Owen Anderson
e21f8339f8 Add prototype code for recomputing a live interval's ranges and valnos through recursive phi construction.
llvm-svn: 61458
2008-12-28 21:48:48 +00:00
Nick Lewycky
bb69bd55a4 Check that the function prototypes are correct before assuming that the
parameters are pointers.

llvm-svn: 61451
2008-12-27 16:20:53 +00:00
Chris Lattner
700ddfea3c add testcase for type parsing.
llvm-svn: 61449
2008-12-27 08:10:46 +00:00
Chris Lattner
b299065a53 implement simplify_type for PATypeHolder so that isa<FooType>(PATypeHolder)
works.

llvm-svn: 61448
2008-12-27 07:47:40 +00:00
Scott Michel
bf224860c8 - Remove Tilmann's custom truncate lowering: it completely hosed over
DAGcombine's ability to find reasons to remove truncates when they were not
  needed. Consequently, the CellSPU backend would produce correct, but _really
  slow and horrible_, code.

  Replaced with instruction sequences that do the equivalent truncation in
  SPUInstrInfo.td.

- Re-examine how unaligned loads and stores work. Generated unaligned
  load code has been tested on the CellSPU hardware; see the i32operations.c
  and i64operations.c in CodeGen/CellSPU/useful-harnesses.  (While they may be
  toy test code, it does prove that some real world code does compile
  correctly.)

- Fix truncating stores in bug 3193 (note: unpack_df.ll will still make llc
  fault because i64 ult is not yet implemented.)

- Added i64 eq and neq for setcc and select/setcc; started new instruction
  information file for them in SPU64InstrInfo.td. Additional i64 operations
  should be added to this file and not to SPUInstrInfo.td.

llvm-svn: 61447
2008-12-27 04:51:36 +00:00
Chris Lattner
cd245cc5c3 add PR #
llvm-svn: 61427
2008-12-25 05:40:38 +00:00
Chris Lattner
fde038935b Add a simple pattern for matching 'bt'.
llvm-svn: 61426
2008-12-25 05:34:37 +00:00
Chris Lattner
062ed6e3dd Fix some JIT encodings.
llvm-svn: 61425
2008-12-25 01:32:49 +00:00
Chris Lattner
f34b843728 BT memory operands load from their address operand.
llvm-svn: 61424
2008-12-25 01:27:10 +00:00
Chris Lattner
e9229dc899 translateX86CC can never fail. Simplify it based on this.
llvm-svn: 61423
2008-12-24 23:53:05 +00:00
Bill Wendling
044248aad1 Darwin likes for the EH frame to be non-local.
llvm-svn: 61420
2008-12-24 08:05:17 +00:00
Bill Wendling
6add893a14 GCC doesn't emit DW_EH_PE_sdata4 for the FDE encoding on Darwin. I'm not sure
about other platforms.

llvm-svn: 61415
2008-12-24 05:25:49 +00:00
Bill Wendling
f348b28d39 Revert the changes in this testcase until Anton can fix them.
llvm-svn: 61414
2008-12-24 05:23:34 +00:00
Dan Gohman
7ff343fe6c Fix a compiler-abort on a testcase where the stack-pointer is added to
a symbolic constant. This is unlikely to be intentional, but it
shouldn't crash the compiler.

llvm-svn: 61408
2008-12-24 00:27:51 +00:00
Chris Lattner
ca08c532f7 indentation
llvm-svn: 61407
2008-12-24 00:11:37 +00:00
Dale Johannesen
88e47fa0e4 Change comments so everybody can understand them, hopefully.
llvm-svn: 61405
2008-12-23 23:47:22 +00:00
Chris Lattner
c20dd60a21 simplify some control flow and reduce indentation, no functionality change.
llvm-svn: 61404
2008-12-23 23:42:27 +00:00
Dale Johannesen
20cf29cad2 Revert 61362 and 61402 until SPEC breakage is fixed.
llvm-svn: 61403
2008-12-23 23:21:35 +00:00
Dale Johannesen
cd64ce7fc8 This fixes the bug in 175.vpr. It doesn't fix the
other SPEC breakage.  I'll be reverting all recent
changes shortly, this checking is mostly so this
change doesn't get lost.

llvm-svn: 61402
2008-12-23 23:05:26 +00:00
Dale Johannesen
e1a3d2da49 Add another permutation where we should get rid of a-a.
llvm-svn: 61401
2008-12-23 23:01:27 +00:00
Dan Gohman
1ba93ac6be Add instruction patterns and encodings for the x86 bt instructions.
llvm-svn: 61400
2008-12-23 22:45:23 +00:00
Anton Korobeynikov
4aaf7c6b6a Update test
llvm-svn: 61399
2008-12-23 22:26:37 +00:00
Anton Korobeynikov
328347152a Restore debug printing
llvm-svn: 61398
2008-12-23 22:26:18 +00:00
Anton Korobeynikov
f4a9c57b23 Sometimes APInt syntax is really ugly... :(
llvm-svn: 61397
2008-12-23 22:26:01 +00:00
Anton Korobeynikov
a2055f8f17 Indent stuff properly
llvm-svn: 61396
2008-12-23 22:25:45 +00:00
Anton Korobeynikov
9559c8c377 Initial checkin of APInt'ififcation of switch lowering
llvm-svn: 61395
2008-12-23 22:25:27 +00:00
Devang Patel
d4aebdfa3f Silence unused variable warnings.
llvm-svn: 61392
2008-12-23 21:56:28 +00:00
Devang Patel
1a9c404ed2 Fix typo.
Silence unused variable warning.

llvm-svn: 61391
2008-12-23 21:55:38 +00:00
Devang Patel
28420198a6 Silience unused warnings.
llvm-svn: 61390
2008-12-23 21:55:04 +00:00
Dan Gohman
a0f1fc06c4 Clean up the atomic opcodes in SelectionDAG.
This removes all the _8, _16, _32, and _64 opcodes and replaces each
group with an unsuffixed opcode. The MemoryVT field of the AtomicSDNode
is now used to carry the size information. In tablegen, the size-specific
opcodes are replaced by size-independent opcodes that utilize the
ability to compose them with predicates.

This shrinks the per-opcode tables and makes the code that handles
atomics much more concise.

llvm-svn: 61389
2008-12-23 21:37:04 +00:00
Chris Lattner
bb08a35f9e add some notes for simplifylibcalls optimizations
llvm-svn: 61385
2008-12-23 20:52:52 +00:00
Chris Lattner
1e2fe309be Testcase to show we can tie together integers and pointers of
the same size.

llvm-svn: 61380
2008-12-23 18:52:26 +00:00
Steve Naroff
266cb1d2fa Tweak --version to include the date and time.
llvm-svn: 61378
2008-12-23 18:41:47 +00:00
Dan Gohman
6bee7ef264 Rename BuildSchedUnits to BuildSchedGraph, and refactor the
code in ScheduleDAGSDNodes' BuildSchedGraph into separate functions.

llvm-svn: 61376
2008-12-23 18:36:58 +00:00
Dan Gohman
a1979cce54 Comment MO_FPImmediate and doxygenate surrounding comments.
llvm-svn: 61374
2008-12-23 18:20:16 +00:00
Dan Gohman
1c1b281cd5 Use isTerminator() instead of isBranch()||isReturn() in
several places. isTerminator() returns true for a superset
of cases, and includes things like FP_REG_KILL, which are
nither return or branch but aren't safe to move/remat/etc.

llvm-svn: 61373
2008-12-23 17:28:50 +00:00
Dan Gohman
b4060b4995 Avoid an unnecessary call to allnodes_size(), which is linear.
llvm-svn: 61372
2008-12-23 17:24:50 +00:00
Dan Gohman
c742da2e94 Minor code simplifications.
llvm-svn: 61371
2008-12-23 17:22:32 +00:00
Zhongxing Xu
f73cf106d1 revert r61368.
llvm-svn: 61369
2008-12-23 05:43:56 +00:00
Zhongxing Xu
7001123f62 Remove dead code.
llvm-svn: 61368
2008-12-23 05:30:44 +00:00
Mon P Wang
993de36832 Added shuffle and splat test cases for r61365.
llvm-svn: 61366
2008-12-23 04:05:08 +00:00
Mon P Wang
7b9b2770bb Fixed code generation for v8i16 and v16i8 splats on X86.
Fixed lowering of v8i16 shuffles for v8i16 when we fall back to extract/insert.

llvm-svn: 61365
2008-12-23 04:03:27 +00:00
Dale Johannesen
92dd1823b4 Fix the time regression I introduced in 464.h264ref with
my last patch to this file.

The issue there was that all uses of an IV inside a loop
are actually references to Base[IV*2], and there was one
use outside that was the same but LSR didn't see the base
or the scaling because it didn't recurse into uses outside
the loop; thus, it used base+IV*scale mode inside the loop
instead of pulling base out of the loop.  This was extra bad
because register pressure later forced both base and IV into
memory.  Doing that recursion, at least enough
to figure out addressing modes, is a good idea in general;
the change in AddUsersIfInteresting does this.  However,
there were side effects....

It is also possible for recursing outside the loop to
introduce another IV where there was only 1 before (if
the refs inside are not scaled and the ref outside is).
I don't think this is a common case, but it's in the testsuite.
It is right to be very aggressive about getting rid of
such introduced IVs (CheckForIVReuse and the handling of
nonzero RewriteFactor in StrengthReduceStridedIVUsers).
In the testcase in question the new IV produced this way
has both a nonconstant stride and a nonzero base, neither
of which was handled before.  And when inserting 
new code that feeds into a PHI, it's right to put such 
code at the original location rather than in the PHI's 
immediate predecessor(s) when the original location is outside 
the loop (a case that couldn't happen before)
(RewriteInstructionToUseNewBase); better to avoid making
multiple copies of it in this case.

Also, the mechanism for keeping SCEV's corresponding to GEP's
no longer works, as the GEP might change after its SCEV
is remembered, invalidating the SCEV, and we might get a bad
SCEV value when looking up the GEP again for a later loop.  
This also couldn't happen before, as we weren't recursing
into GEP's outside the loop.

I owe some testcases for this, want to get it in for nightly runs.

llvm-svn: 61362
2008-12-23 02:12:52 +00:00