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

72435 Commits

Author SHA1 Message Date
Stuart Hastings
5047039d6d Fix inelegant initialization.
llvm-svn: 131538
2011-05-18 15:54:26 +00:00
Justin Holewinski
eb209f0916 PTX: add flag to disable mad/fma selection
Patch by Dan Bailey

llvm-svn: 131537
2011-05-18 15:42:23 +00:00
Duncan Sands
d3292b9f1e Revert commit 131534 since it seems to have broken several buildbots.
Original log entry:
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.

llvm-svn: 131536
2011-05-18 14:57:56 +00:00
Nadav Rotem
b7d689c706 Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.

llvm-svn: 131534
2011-05-18 12:26:38 +00:00
Duncan Sands
2f982a147f Now that SrcBits and DestBits always represent the primitive size, rather
than either the primitive size or the element primitive size (in the case
of vectors), simplify the vector logic.  No functionality change.  There
is some distracting churn in the patch because I lined up comments better
while there - sorry about that.

llvm-svn: 131533
2011-05-18 10:59:25 +00:00
Duncan Sands
4a18d9e5d2 Tighten up checking of the validity of casts. (1) The IR parser would
happily accept things like "sext <2 x i32> to <999 x i64>".  It would
also accept "sext <2 x i32> to i64", though the verifier would catch
that later.  Fixed by having castIsValid check that vector lengths match
except when doing a bitcast.  (2) When creating a cast instruction, check
that the cast is valid (this was already done when creating constexpr
casts).  While there, replace getScalarSizeInBits (used to allow more
vector casts) with getPrimitiveSizeInBits in getCastOpcode and isCastable
since vector to vector casts are now handled explicitly by passing to the
element types; i.e. this bit should result in no functional change.

llvm-svn: 131532
2011-05-18 09:21:57 +00:00
Duncan Sands
b68c17bcb8 Teach getCastOpcode about element-by-element vector casts. For example, "trunc"
can be used to turn a <4 x i64> into a <4 x i32> but getCastOpcode would assert
if you passed these types to it.  Note that this strictly extends the previous
functionality: if getCastOpcode previously accepted two vector types (i.e. didn't
assert) then it still will and returns the same opcode (BitCast).  That's because
before it would only accept vectors with the same bitwidth, and the new code only
touches vectors with the same length.  However if two vectors have both the same
bitwidth and the same length then their element types have the same bitwidth, so
the new logic will return BitCast as before.

llvm-svn: 131530
2011-05-18 07:13:41 +00:00
Tanya Lattner
06cb9cbf98 In r131488 I misunderstood how VREV works. It splits the vector in half and splits each half. Therefore, the real problem was that we were using a VREV64 for a 4xi16, when we should have been using a VREV32.
Updated test case and reverted change to the PerfectShuffle Table.

llvm-svn: 131529
2011-05-18 06:42:21 +00:00
Charles Davis
2e7d0eef98 Implement the Win64 EH directive methods for the assembly language streamer.
GAS has no such directives (not even mingw-w64 GAS has them), so I took
creative license with their names in assembly. I prefixed them all with
"w64_" to avoid namespace collisions, for example. If I discover that GAS
has taken a different approach, I'll change ours to match.

llvm-svn: 131525
2011-05-18 04:58:05 +00:00
Jakob Stoklund Olesen
2310f43683 Eliminate dead dead code elimination code.
llvm-svn: 131524
2011-05-18 04:51:15 +00:00
Jakob Stoklund Olesen
cd6bbe0171 Also use shrinkToUses after AdjustCopiesBackFrom().
The 'last use' may not be in the same basic block, and we still want a correct
live range.

llvm-svn: 131523
2011-05-18 04:51:12 +00:00
Charles Davis
81fa5ec5c3 While thinking about how to know where the functions' boundaries are for
the purposes of the Win64 EH tables, I realized we had no way to tell where
the function ends. (MASM bounds functions with PROC and ENDP keywords.)
Add a directive to delimit the end of the function, and rename the 'frame'
directive to more accurately reflect its duality with the new directive.

llvm-svn: 131522
2011-05-18 04:47:22 +00:00
Jakob Stoklund Olesen
504b1bd8ab Properly shrink live ranges after deleting dead copies. Clean up after all joined copies.
LiveInterval::shrinkToUses recomputes the live range from scratch instead of
removing snippets. This should avoid the problem with dangling live ranges.

Leave physreg identity copies alone. They can be created when joining a virtreg
with a physreg. They don't affect register allocation, and they will be removed
by the rewriter.

llvm-svn: 131521
2011-05-18 04:18:19 +00:00
Cameron Zwarich
b89a768a61 Fix typo.
llvm-svn: 131519
2011-05-18 02:29:50 +00:00
Cameron Zwarich
b922060f98 Fix more of PR8825 by correctly using rGPR registers when lowering atomic
compare-and-swap intrinsics.

llvm-svn: 131518
2011-05-18 02:20:07 +00:00
Eli Friedman
5d2823e452 Start trying to make InstCombine preserve more debug info. The idea here is to set the debug location on the IRBuilder, which will be then right location in most cases. This should magically give many transformations debug locations, and fixing places which are missing a debug location will usually just means changing the code creating it to use the IRBuilder.
As an example, the change to InstCombineCalls catches a common case where a call to a bitcast of a function is rewritten.

Chris, does this approach look reasonable?

llvm-svn: 131516
2011-05-18 01:28:27 +00:00
Eli Friedman
358d9a5af3 Use ReplaceInstUsesWith instead of replaceAllUsesWith where appropriate in instcombine.
llvm-svn: 131512
2011-05-18 00:32:01 +00:00
Eli Friedman
97233814a0 Make some of the fast-isel tests actually test fast-isel (and fix test failures).
llvm-svn: 131510
2011-05-18 00:00:10 +00:00
Devang Patel
b75e746499 Preseve line numbers while simplifying CFG.
llvm-svn: 131508
2011-05-17 23:29:05 +00:00
Cameron Zwarich
ed470705c0 Actually, the address operand of the Thumb2 LDREX / STREX instructions *can*
take r13, so we can just make it a GPR. This fixes PR8825.

llvm-svn: 131507
2011-05-17 23:26:20 +00:00
Cameron Zwarich
15807bac51 Correct a minor problem with the Thumb2 LDREX and STREX instruction encodings. They
were marked as taking a tGPR when in reality they take an rGPR.

llvm-svn: 131506
2011-05-17 23:11:12 +00:00
Bill Wendling
f4cb799615 Conditionalize the format of the GCOV files by target type. Darwin uses the 4.2
format.

llvm-svn: 131503
2011-05-17 23:05:13 +00:00
Eli Friedman
ade6f78867 Make fast-isel miss counting in -stats and -fast-isel-verbose take terminators into account; since there are many fewer isel misses with recent changes, misses caused by terminators are more significant.
llvm-svn: 131502
2011-05-17 23:02:10 +00:00
Dan Gohman
834a63625d Misc. code cleanups.
llvm-svn: 131497
2011-05-17 22:22:52 +00:00
Dan Gohman
5d23a937f7 Misc. code cleanups.
llvm-svn: 131495
2011-05-17 22:20:36 +00:00
Stuart Hastings
719cee1aa8 X86 pmovsx/pmovzx ignore the upper half of their inputs.
rdar://problem/6945110

llvm-svn: 131493
2011-05-17 22:13:31 +00:00
Tanya Lattner
7145d69427 vrev is incorrectly defined in the perfect shuffle table. The ordering is backwards (should be 0x3210 versus 0x1032) which exposed a bug when doing a shuffle on a 4xi16. I've attached a test case.
llvm-svn: 131488
2011-05-17 20:48:40 +00:00
Devang Patel
b7b53e9a24 Preserve line number information.
llvm-svn: 131482
2011-05-17 20:00:02 +00:00
Devang Patel
9a0301219b Set debug loc for new load instruction.
llvm-svn: 131481
2011-05-17 19:43:38 +00:00
Devang Patel
8a2b06e577 Preserve line number information.
llvm-svn: 131480
2011-05-17 19:43:06 +00:00
Galina Kistanova
96a3ce9a6f Move test for appropriate directory.
llvm-svn: 131477
2011-05-17 19:06:43 +00:00
Mon P Wang
602defb22e Enable autodetect of popcnt
llvm-svn: 131476
2011-05-17 18:33:37 +00:00
Jim Grosbach
5b691ebabf Frame indices are signed. Update MachineOperand methods accordingly.
llvm-svn: 131475
2011-05-17 18:29:21 +00:00
Eli Friedman
ba315a4fcc Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.
This is r131438 with a couple small fixes.

llvm-svn: 131474
2011-05-17 18:29:03 +00:00
Eli Friedman
42d94ce561 Clean up the mess created by r131467+r131469.
llvm-svn: 131471
2011-05-17 18:02:22 +00:00
Stuart Hastings
581113d8a0 Revert 131467 due to buildbot complaint.
llvm-svn: 131469
2011-05-17 16:59:46 +00:00
Stuart Hastings
a2509a7ec3 Fix an obscure issue in X86_64 parameter passing: if a tiny byval is
passed as the fifth parameter, insure it's passed correctly (in R9).
rdar://problem/6920088

llvm-svn: 131467
2011-05-17 16:45:55 +00:00
Jakob Stoklund Olesen
6645e60d56 Tweak cross-class coalescing to be more aggressive when the target class is small.
The greedy register allocator has live range splitting and register class
inflation, so it can actually fully undo this join, including restoring the
original register classes.

We still don't want to do this for long live ranges, mostly because of the high
register pressure of there are many constrained live ranges overlapping.

llvm-svn: 131466
2011-05-17 16:38:37 +00:00
Rafael Espindola
d086472933 Don't include information about the build into the information returned by
getHostTriple. This fixes a 32 bit clang running on a 64 bit ubuntu.

llvm-svn: 131463
2011-05-17 15:26:34 +00:00
Nadav Rotem
1b263b575b Fix a bug in PerformEXTRACT_VECTOR_ELTCombine. The code created an ADD SDNode
with two different types, in cases where the index and the ptr had different
types.

llvm-svn: 131461
2011-05-17 08:31:57 +00:00
Eric Christopher
d613c05f26 Update comment.
llvm-svn: 131459
2011-05-17 08:16:14 +00:00
Eric Christopher
c03ef7ebb3 Support XOR and AND optimization with no return value.
Finishes off rdar://8470697

llvm-svn: 131458
2011-05-17 08:10:18 +00:00
Eric Christopher
f81a665961 Couple less magic numbers.
llvm-svn: 131457
2011-05-17 07:50:41 +00:00
Eric Christopher
dc12267689 Make this code a little less magic number laden.
llvm-svn: 131456
2011-05-17 07:47:55 +00:00
Chris Lattner
294ec479fb add a note
llvm-svn: 131455
2011-05-17 07:22:33 +00:00
Stuart Hastings
d3595bfb53 Drop lli, revise test.
llvm-svn: 131452
2011-05-17 02:38:59 +00:00
Eli Friedman
3aa2fe389f Back out r131444 and r131438; they're breaking nightly tests. I'll look into
it more tomorrow.

llvm-svn: 131451
2011-05-17 02:36:59 +00:00
Eli Friedman
410094a937 Fix test.
llvm-svn: 131444
2011-05-17 00:39:14 +00:00
Evan Cheng
24322e6f0a Add target triple so test doesn't fail on Windows machines.
llvm-svn: 131439
2011-05-17 00:15:58 +00:00
Eli Friedman
8c4de16d2b Add x86 fast-isel for calls returning first-class aggregates. rdar://9435872.
llvm-svn: 131438
2011-05-17 00:13:47 +00:00