1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

90054 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
72e153bdba Remove wrong and unnecessary assertion.
PHIs are allowed to have multiple operand pairs per predecessor, and
this code works just fine when it happens.

llvm-svn: 176734
2013-03-08 23:00:13 +00:00
Jan Wen Voung
2346df4d41 Disable statistics on Release builds and move tests that depend on -stats.
Summary:
Statistics are still available in Release+Asserts (any +Asserts builds),
and stats can also be turned on with LLVM_ENABLE_STATS.

Move some of the FastISel stats that were moved under DEBUG()
back out of DEBUG(), since stats are disabled across the board now.

Many tests depend on grepping "-stats" output.  Move those into
a orig_dir/Stats/. so that they can be marked as unsupported
when building without statistics.

Differential Revision: http://llvm-reviews.chandlerc.com/D486

llvm-svn: 176733
2013-03-08 22:56:31 +00:00
Eli Bendersky
4eda53eceb Clean up out-of-date comments and some stray whitespace
llvm-svn: 176729
2013-03-08 22:29:44 +00:00
Michael Ilseman
927ac3ca8b Early exit from getAllocationData() and isFreeCall() for intrinsics.
llvm-svn: 176722
2013-03-08 21:15:00 +00:00
David Blaikie
e0efb3660f Assert to bounds check MDNode::getOperand.
The getOperandPtr utility already bounds checks, but allows one-off-the-end.
This assert should catch the cases that could previously have been dereferencing
these one-off-the-end pointer. Happily, no cases of this came up with this
change.

llvm-svn: 176721
2013-03-08 21:08:23 +00:00
Michael Ilseman
934c99e905 Remove trailing whitespace
llvm-svn: 176720
2013-03-08 21:03:09 +00:00
Jakob Stoklund Olesen
896cede5d3 No really, don't use end().
Clearly, this function is never actually called with the last
instruction in the function.

llvm-svn: 176708
2013-03-08 18:36:36 +00:00
David Blaikie
2d9edabe41 Remove -print-dbginfo as it is unused & bitrotten.
This pass hasn't been touched in two years & would fail with assertions against
the current debug info metadata format (the only test case for it still uses a
many-versions old debug info metadata format)

llvm-svn: 176707
2013-03-08 18:17:46 +00:00
Jakob Stoklund Olesen
7528b1268b Rewrite the physreg part of findLastUseBefore().
To find the last use of a register unit, start from the bottom and scan
upwards until a user is found.

<rdar://problem/13353090>

llvm-svn: 176706
2013-03-08 18:08:57 +00:00
Jakob Stoklund Olesen
504736022a Avoid creating a SlotIndex from the end() iterator.
No test case, spotted by inspection.

llvm-svn: 176705
2013-03-08 18:08:54 +00:00
Benjamin Kramer
654f271839 Remove default from fully covered switch.
llvm-svn: 176703
2013-03-08 17:03:19 +00:00
Benjamin Kramer
2af1f1ea44 Force cpu in test.
llvm-svn: 176702
2013-03-08 17:01:18 +00:00
Benjamin Kramer
7b2d670a66 Insert the reduction start value into the first bypass block to preserve domination.
Fixes PR15344.

llvm-svn: 176701
2013-03-08 16:58:37 +00:00
Tom Stellard
963bae7608 R600: Optimize another selectcc case
fold selectcc (selectcc x, y, a, b, cc), b, a, b, setne ->
     selectcc x, y, a, b, cc

Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176700
2013-03-08 15:37:11 +00:00
Tom Stellard
2eae31f648 R600: Improve custom lowering of select_cc
Two changes:
1. Prefer SET* instructions when possible
2. Handle the CND*_INT case with floating-point args

Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176699
2013-03-08 15:37:09 +00:00
Tom Stellard
3f88348d66 R600: Change operation action from Custom to Expand for BR_CC
Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176698
2013-03-08 15:37:07 +00:00
Tom Stellard
54e0b366e8 R600: Change operation action from Custom to Expand for SETCC
Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176697
2013-03-08 15:37:05 +00:00
Tom Stellard
62d91841c1 R600: Set BooleanContents to ZeroOrNegativeOneBooleanContent
Reviewed-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176696
2013-03-08 15:37:03 +00:00
Tom Stellard
3cb97749ac LegalizeDAG: Respect the result of TLI.getBooleanContents() when expanding SETCC
llvm-svn: 176695
2013-03-08 15:37:02 +00:00
Tom Stellard
fa72758e1d DAGCombiner: Use correct value type for checking legality of BR_CC v3
LegalizeDAG.cpp uses the value of the comparison operands when checking
the legality of BR_CC, so DAGCombiner should do the same.

v2:
  - Expand more BR_CC value types for NVPTX

v3:
  - Expand correct BR_CC value types for Hexagon, Mips, and XCore.

llvm-svn: 176694
2013-03-08 15:36:57 +00:00
Vincent Lejeune
7cd72eed68 R600: Change addresspace in fold-kcache.ll
AddressSpace definition has changed in a previous commit, reflect it
to avoid false failure.

llvm-svn: 176693
2013-03-08 15:34:07 +00:00
Tim Northover
35bab190c4 AArch64: specify full triple in test as only Linux works for now.
llvm-svn: 176692
2013-03-08 15:27:30 +00:00
Christian Konig
dcd30c46b9 R600/SI: adjust test to recent changes
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176691
2013-03-08 14:44:00 +00:00
Jyotsna Verma
6ba1f8e0d8 Hexagon: Add patterns for zero extended loads from i1->i64.
llvm-svn: 176689
2013-03-08 14:15:15 +00:00
Tim Northover
215762f13b AArch64: expand sincos operations, we don't support them.
Patch based on Mans Rullgard's.

llvm-svn: 176688
2013-03-08 13:55:07 +00:00
Michel Danzer
395066d259 R600/SI: Use source scheduler
This is certainly not the last word on scheduling for this target, but
right now this allows a few apps to run / finish with radeonsi, most
notably UT2004 / Lightsmark. They fail to compile some shaders with the
default scheduler because it ends up trying to spill registers, which
we don't support yet (and which is probably a bad idea in general for
performance if it can be avoided).

NOTE: This is a candidate for the Mesa stable branch.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176687
2013-03-08 10:58:01 +00:00
Andrew Trick
e177d54fc3 Add -verify-misched option.
This verifies live intervals both before and after scheduling. It's
useful for anyone hacking on live interval update.

Note that we don't yet pass verification all the time. We don't yet
handle updating nonallocatable live intervals perfectly.

llvm-svn: 176685
2013-03-08 05:40:34 +00:00
David Blaikie
8873f284b2 Another test fix for r176671.
llvm-svn: 176679
2013-03-08 02:27:40 +00:00
David Blaikie
c1ad732102 Couple of test fixes for r176671.
Not sure why these aren't failing on my linux machine, but this should cover
it.

llvm-svn: 176678
2013-03-08 02:26:16 +00:00
Bill Wendling
8c7ceb2a0e Revert r176154 in favor of a better approach.
Code generation makes some basic assumptions about the IR it's been given. In
particular, if there is only one 'invoke' in the function, then that invoke
won't be going away. However, with the advent of the `llvm.donothing' intrinsic,
those invokes may go away. If all of them go away, the landing pad no longer has
any users. This confuses the back-end, which asserts.

This happens with SjLj exceptions, because that's the model that modifies the IR
based on there being invokes, etc. in the function.

Remove any invokes of `llvm.donothing' during SjLj EH preparation. This will
give us a CFG that the back-end won't be confused about. If all of the invokes
in a function are removed, then the SjLj EH prepare pass won't insert the bogus
code the relies upon the invokes being there.
<rdar://problem/13228754&13316637>

llvm-svn: 176677
2013-03-08 02:21:08 +00:00
Chris Lattner
0f961b9086 remove an ancient and quaint bit of commented out makefile goo from when
GCC was the system compiler on the mac.

llvm-svn: 176675
2013-03-08 01:26:10 +00:00
David Blaikie
41f29ff448 Upgrade tests to the latest debug info format.
Mostly this is just changing the named metadata (llvm.dbg.sp, llvm.dbg.gv,
llvm.dbg.<func>.lv, etc -> llvm.dbg.cu), adding a few fields to older records
(DIVariable: flags/inlined-at, DICompileUnit: sp/gv/types,
DISubprogram: local variables list)

The tests to update were discovered by a change I'm working on to remove debug
info version support - so any tests using old debug info versions I haven't
updated probably are bad tests or just not actually designed to test debug
info.

llvm-svn: 176671
2013-03-08 00:23:31 +00:00
Jakob Stoklund Olesen
501e97984e Add a getPassName() method.
llvm-svn: 176669
2013-03-07 23:55:51 +00:00
Jakob Stoklund Olesen
b83588cd0b Rename isEarlierInSameTrace to isUsefulDominator.
In very rare cases caused by irreducible control flow, the dominating
block can have the same trace head without actually being part of the
trace.

As long as such a dominator still has valid instruction depths, it is OK
to use it for computing instruction depths.

Rename the function to avoid lying, and add a check that instruction
depths are computed for the dominator.

llvm-svn: 176668
2013-03-07 23:55:49 +00:00
Jakub Staszak
88061183a0 Keep coding stanard.
llvm-svn: 176661
2013-03-07 22:20:06 +00:00
Jakub Staszak
d94b12a75b Don't create IRBuilder if we can return from the method earlier.
llvm-svn: 176660
2013-03-07 22:10:33 +00:00
Chad Rosier
32844ae1ef [fast-isel] Seriously, add support for the expect intrinsic.
rdar://13370942

llvm-svn: 176659
2013-03-07 21:38:33 +00:00
Benjamin Kramer
2d44bd7bc4 Fix tautological compare. Not sure why this didn't trigger any test failures.
llvm-svn: 176652
2013-03-07 20:56:18 +00:00
Benjamin Kramer
91b6dfab6b Replace temporary vectors with arrays.
llvm-svn: 176651
2013-03-07 20:53:34 +00:00
Chad Rosier
bd6edf2054 [fast-isel] Add support for the expect intrinsic.
rdar://13370942

llvm-svn: 176649
2013-03-07 20:42:17 +00:00
Benjamin Kramer
bc0e70c415 ArrayRefize some code. No functionality change.
llvm-svn: 176648
2013-03-07 20:33:29 +00:00
Jyotsna Verma
50e5f420d7 Hexagon: Handle i8, i16 and i1 Var Args.
llvm-svn: 176647
2013-03-07 20:28:34 +00:00
Jakub Staszak
7385023b94 Simplify code. No functionality change.
llvm-svn: 176646
2013-03-07 20:22:39 +00:00
Jakub Staszak
d62f609790 Change Index type from unsigned long to unsigned. This should fix PR14980.
llvm-svn: 176645
2013-03-07 20:21:27 +00:00
Jakub Staszak
9f20ea9a91 Remove trailing spaces.
llvm-svn: 176643
2013-03-07 20:04:17 +00:00
Jakub Staszak
9d05d6ce17 Change NULL to 0.
llvm-svn: 176642
2013-03-07 20:01:47 +00:00
Jakub Staszak
2b0d2f9f99 ArrayRef ca accept one element. Simplify code a little bit, also it matches now
coding in the other places of the file.

llvm-svn: 176641
2013-03-07 20:01:19 +00:00
Andrew Trick
b23f8be448 pre-RA-sched debug-only fix
llvm-svn: 176638
2013-03-07 19:21:08 +00:00
Jyotsna Verma
c3d8f08545 Hexagon: Add support to lower block address.
llvm-svn: 176637
2013-03-07 19:10:28 +00:00
Andrew Trick
3a55ad740d pre-RA-sched assertion fix. This bug was exposed by r176037.
rdar:13370002 [pre-RA-sched] assertion: released too many times

I tracked this down to an earlier hack that is no longer applicable
and interfered with normal scheduler logic. With the changes in
r176037, it was causing an instruction to be scheduled multiple times.

I have an external test case that I tried hard to reduce and
failed. I can't even reproduce with llc.

llvm-svn: 176636
2013-03-07 19:07:57 +00:00