1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 22:42:52 +01:00
Commit Graph

39534 Commits

Author SHA1 Message Date
Evan Cheng
d4c055e1f8 Disable PRE for now. It seems to be breaking llvm-gcc bootstrapping.
llvm-svn: 52518
2008-06-20 01:01:07 +00:00
Dan Gohman
0d86d31373 Fix the index calculations for the extractvalue lowering code.
llvm-svn: 52517
2008-06-20 00:54:19 +00:00
Dan Gohman
826ad19523 Simplify the ComputeLinearIndex logic and fix a few bugs.
llvm-svn: 52516
2008-06-20 00:53:00 +00:00
Dan Gohman
d61d67b75c It's invalid to take the one-past-the-end address of a non-array
object.

llvm-svn: 52515
2008-06-20 00:49:21 +00:00
Dan Gohman
bcddb92f4e Simplify this code. Thanks Chris!
llvm-svn: 52514
2008-06-20 00:47:44 +00:00
Evan Cheng
4006f4cdf0 ISD::UNDEF should be expanded recursively / iteratively.
llvm-svn: 52508
2008-06-19 22:01:11 +00:00
Owen Anderson
c979fcf8ff Add a hidden -disable-pre flag for testing purposes. This should be removed
once benchmarking is completed.

llvm-svn: 52506
2008-06-19 19:57:25 +00:00
Owen Anderson
35fb8dbfef PRE requires that critical edges be split.
llvm-svn: 52505
2008-06-19 19:54:19 +00:00
Bill Wendling
68bdf9f6d4 Remove dead code causing a warning.
llvm-svn: 52502
2008-06-19 18:00:44 +00:00
Dan Gohman
98d028eb42 Use the common API for adding instructions to basic blocks instead of
using BasicBlock::getInstList.

llvm-svn: 52500
2008-06-19 17:53:32 +00:00
Owen Anderson
87d761460e Be sure to remove values from the value numbering table after we delete them.
This fixes a failure on povray.

llvm-svn: 52499
2008-06-19 17:53:26 +00:00
Dan Gohman
a18aa3f3a2 Use Instruction::moveBefore instead of manipulating the instruction list
directly.

llvm-svn: 52498
2008-06-19 17:47:47 +00:00
Dan Gohman
01679b25c0 Avoid using BasicBlock::getInstList directly in a few places.
llvm-svn: 52497
2008-06-19 17:37:25 +00:00
Owen Anderson
aa850d32db Revert support for insertvalue and extractvalue instructions for the moment.
GVN expects that all inputs which to an instruction fall somewhere in the value
hierarchy, which isn't true for these.

llvm-svn: 52496
2008-06-19 17:25:39 +00:00
Dan Gohman
cd78a0e385 Use the transferSuccessors helper function.
llvm-svn: 52495
2008-06-19 17:22:29 +00:00
Dan Gohman
68c5bdd4f5 Delete dead code.
llvm-svn: 52494
2008-06-19 17:18:39 +00:00
Owen Anderson
5eeafbc3f7 Add an idx_iterator to the insertvalue and extractvalue instructions.
llvm-svn: 52493
2008-06-19 17:15:57 +00:00
Dan Gohman
42e4ecff62 The inline keyword goes before the return type. This fixes a compiler warning.
llvm-svn: 52492
2008-06-19 16:16:06 +00:00
Matthijs Kooijman
343ce1868f Modify some ipconstprop tests to also test with invokes.
llvm-svn: 52491
2008-06-19 09:27:44 +00:00
Matthijs Kooijman
41c5b9a77c Use a CallSite to find the nth argument of a call/invoke instruction instead of
using getOperand() directly. This makes things work with invoke instructions as
well.

llvm-svn: 52489
2008-06-19 08:53:24 +00:00
Duncan Sands
054b82d555 Fix some warnings reported by gcc-4.3. Hopefully
this still compiles on windows - I can't test!

llvm-svn: 52488
2008-06-19 08:47:31 +00:00
Evan Cheng
b12290e31b Missed a check.
llvm-svn: 52487
2008-06-19 06:17:19 +00:00
Eli Friedman
570aa6f801 Fix a bug with <8 x i16> shuffle lowering on X86 where parts of the
shuffle could be skipped.  The check is invalid because the loop index i 
doesn't correspond to the element actually inserted. The correct check is
already done a few lines earlier, for whether the element is already in 
the right spot, so this shouldn't have any effect on the codegen for 
code that was already correct.

llvm-svn: 52486
2008-06-19 06:09:51 +00:00
Owen Anderson
864a2c23ed Revert my last patch, which was causing regression test failures.
llvm-svn: 52485
2008-06-19 05:29:34 +00:00
Evan Cheng
919b735586 New test case.
llvm-svn: 52483
2008-06-19 01:50:24 +00:00
Evan Cheng
ee801276b3 This also got better (55 - 51 instructions). But doing one more re-materialization.
llvm-svn: 52482
2008-06-19 01:50:13 +00:00
Evan Cheng
56e17b525c This got better.
llvm-svn: 52481
2008-06-19 01:46:43 +00:00
Evan Cheng
22b431d28f Coalesce copy from one register class to a sub register class. e.g. X86::MOV16to16_.
llvm-svn: 52480
2008-06-19 01:39:21 +00:00
Evan Cheng
f129d15d03 Cosmetic changes.
llvm-svn: 52479
2008-06-19 01:21:26 +00:00
Evan Cheng
4416f16a6a Unneeded include's.
llvm-svn: 52478
2008-06-19 01:21:02 +00:00
Evan Cheng
968679913e Minor spiller tweak to unfavor reload into load/store instructions.
llvm-svn: 52477
2008-06-19 01:16:17 +00:00
Owen Anderson
abbc43e493 Insert empty slots into the instruction numbering in live intervals, so that we can more easily
add new instructions.

llvm-svn: 52475
2008-06-19 00:10:49 +00:00
Owen Anderson
597b40ed60 Remove this test until the corresponding patch is reapplied because it's causing make check to crash for some people.
llvm-svn: 52473
2008-06-18 22:37:31 +00:00
Owen Anderson
5b8d39569b Add support for extractvalue and insertvalue instructions in GVN.
llvm-svn: 52472
2008-06-18 21:59:00 +00:00
Owen Anderson
3f78e260c1 Add local PRE to GVN. This only operates in cases where it would not increase code size, namely when the instantiated expression
would only need to be created in one predecessor.

llvm-svn: 52471
2008-06-18 21:41:49 +00:00
Bill Wendling
adf865a112 Refactor the way to get a string containing the features of the target.
llvm-svn: 52470
2008-06-18 21:39:02 +00:00
Argyrios Kyrtzidis
5ef6b9b977 Fix the source line debug information for the Windows platform.
According to DWARF-2 specification, the line information is provided through an offset in the .debug_line section.
Replace the label reference that is used with a section offset.

llvm-svn: 52468
2008-06-18 19:27:37 +00:00
Dan Gohman
db0beeefb1 Fix a missing comma spotted by Bram Geron.
llvm-svn: 52467
2008-06-18 18:42:13 +00:00
Chris Lattner
f9d9f0ec4c Fix the regressions on sext-misc.ll my patch yesterday caused.
llvm-svn: 52466
2008-06-18 18:11:55 +00:00
Owen Anderson
e680ac8dcb Revert r52459, which was causing an infinite loop or massive slowdown on MultiSource/Applications/SPASS, and possibly others as well.
Please reapply once this is fixed.

llvm-svn: 52465
2008-06-18 17:32:16 +00:00
Dan Gohman
606a60ad68 Move SCEVExpander::visitAddExpr out-of-line.
llvm-svn: 52464
2008-06-18 16:37:11 +00:00
Dan Gohman
82f9df016e Move LSR's private isZero function to a public SCEV member
function, and make use of it in several places.

llvm-svn: 52463
2008-06-18 16:23:07 +00:00
Gabor Greif
14dc959397 fix validator warning
llvm-svn: 52461
2008-06-18 14:05:31 +00:00
Gabor Greif
41d941a446 prettify, no semantic changes
llvm-svn: 52460
2008-06-18 13:44:57 +00:00
Matthijs Kooijman
b7e2818227 Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of
dependencies between return values and/or arguments. Also make the handling of
arguments and return values the same.

The pass now looks properly inside returned structs, but only at the first                                                                                     
level (ie, not inside nested structs).

Also add a testcase for testing various variations of (multiple) dead rerturn
values.

llvm-svn: 52459
2008-06-18 11:12:53 +00:00
Matthijs Kooijman
8177832230 Reapply r52397 (make IPConstProp promote returned arguments), but fixed this
time. Sorry for the trouble!

This time, also add a testcase, which I should have done in the first place...

llvm-svn: 52455
2008-06-18 08:30:37 +00:00
Evan Cheng
0570953e28 XOR32rr, etc. are not AsCheapAsMove, but MOV32ri, etc. are.
llvm-svn: 52454
2008-06-18 08:13:07 +00:00
Matthijs Kooijman
bb59138fa6 Reapply r52396, it was unrelated to the breakage (that was caused by r52397, my
commit after this).

llvm-svn: 52453
2008-06-18 08:09:27 +00:00
Evan Cheng
ad0a4a31f8 Complete support for two-address pass rematerialization. Now *almost* always a win.
llvm-svn: 52452
2008-06-18 07:49:14 +00:00
Evan Cheng
e447be0532 Add MachineRegisterInfo::use_empty.
llvm-svn: 52451
2008-06-18 07:47:55 +00:00