Commit Graph

39479 Commits

Author SHA1 Message Date
Evan Cheng
72d255aff9 This also got better (55 - 51 instructions). But doing one more re-materialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52482 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 01:50:13 +00:00
Evan Cheng
81d39e63e2 This got better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52481 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 01:46:43 +00:00
Evan Cheng
e00f5de361 Coalesce copy from one register class to a sub register class. e.g. X86::MOV16to16_.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52480 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 01:39:21 +00:00
Evan Cheng
1b38ec83f0 Cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52479 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 01:21:26 +00:00
Evan Cheng
082e7c12a1 Unneeded include's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52478 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 01:21:02 +00:00
Evan Cheng
bdf34bc12b Minor spiller tweak to unfavor reload into load/store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52477 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 01:16:17 +00:00
Owen Anderson
6c5e561668 Insert empty slots into the instruction numbering in live intervals, so that we can more easily
add new instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52475 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-19 00:10:49 +00:00
Owen Anderson
93d606a9b3 Remove this test until the corresponding patch is reapplied because it's causing make check to crash for some people.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52473 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 22:37:31 +00:00
Owen Anderson
d34ac6e782 Add support for extractvalue and insertvalue instructions in GVN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52472 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 21:59:00 +00:00
Owen Anderson
b230372437 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52471 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 21:41:49 +00:00
Bill Wendling
e424254897 Refactor the way to get a string containing the features of the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52470 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 21:39:02 +00:00
Argyrios Kyrtzidis
f7acf8f288 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52468 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 19:27:37 +00:00
Dan Gohman
0066db626f Fix a missing comma spotted by Bram Geron.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52467 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 18:42:13 +00:00
Chris Lattner
6c3bfba06e Fix the regressions on sext-misc.ll my patch yesterday caused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52466 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 18:11:55 +00:00
Owen Anderson
bb3761c9e5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52465 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 17:32:16 +00:00
Dan Gohman
e24fa64d52 Move SCEVExpander::visitAddExpr out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52464 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 16:37:11 +00:00
Dan Gohman
cfeb6a4506 Move LSR's private isZero function to a public SCEV member
function, and make use of it in several places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52463 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 16:23:07 +00:00
Gabor Greif
a9c0f2b03f fix validator warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52461 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 14:05:31 +00:00
Gabor Greif
dfed118f22 prettify, no semantic changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52460 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 13:44:57 +00:00
Matthijs Kooijman
ca85d65277 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52459 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 11:12:53 +00:00
Matthijs Kooijman
c2afe89019 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...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52455 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 08:30:37 +00:00
Evan Cheng
359e9371b9 XOR32rr, etc. are not AsCheapAsMove, but MOV32ri, etc. are.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52454 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 08:13:07 +00:00
Matthijs Kooijman
8b0fcf38ef Reapply r52396, it was unrelated to the breakage (that was caused by r52397, my
commit after this).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52453 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 08:09:27 +00:00
Evan Cheng
7543e58a77 Complete support for two-address pass rematerialization. Now *almost* always a win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52452 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 07:49:14 +00:00
Evan Cheng
ce049437d6 Add MachineRegisterInfo::use_empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52451 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 07:47:55 +00:00
Evan Cheng
625986afea Cosmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52450 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 07:47:28 +00:00
Bill Wendling
604a818463 If compiling for PPC on an i386 box, the LTO wouldn't get the altivec (and
other) feature information. The workaround is inelegant and could be cleaned up
if this information were available some other way (say, in the IR).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52447 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 06:35:30 +00:00
Chris Lattner
0521e3cdc1 implement some simple bswap optimizations, rdar://5992453
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52442 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 04:33:20 +00:00
Chris Lattner
a2eec61607 temporarily revert this testcase since its patch was reverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52441 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 04:03:23 +00:00
Chris Lattner
8114b718c9 make truncate/sext elimination capable of changing phi's. This
implements rdar://6013816 and the testcase in Transforms/InstCombine/sext-misc.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52440 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 04:00:49 +00:00
Evan Cheng
fab8387384 Unbreak DECLARE isel in pic mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52439 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 02:48:27 +00:00
Devang Patel
64cd658223 Preserve dominance frontier while trivially unswitching loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52438 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 02:16:38 +00:00
Devang Patel
6d0cc55ef3 Check empty dominance frontier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52437 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-18 02:12:09 +00:00
Dan Gohman
44f6a2c951 Auto-upgrade code for multiple-value return statements. This code
isn't actually called yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52435 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 23:38:43 +00:00
Dan Gohman
80b9626ee3 In InsertValueInst's copy ctor, actually copy the operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52434 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 23:25:49 +00:00
Owen Anderson
2960ed4b85 We don't want to find dependencies within the same block in this case. It leads to incorrect results because
we're detecting something at or after the call we're querying on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52433 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 22:27:06 +00:00
Dan Gohman
b79bf1966d Implement the ExtractValueInst::getIndexedType that accepts one
index value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52432 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 21:07:55 +00:00
Evan Cheng
f26e8557de Live-through live interval is [mbb start, mbb end+1].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52431 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 20:13:36 +00:00
Evan Cheng
739583be56 When extending a liveinterval by commuting, don't throw away the live ranges that are not affected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52430 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 20:11:16 +00:00
Ted Kremenek
8d6a58c5d5 Consistently set "Buckets[NumBuckets] = reinterpret_cast<void*>(-1)" throughout FoldingSet.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52425 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 19:12:43 +00:00
Owen Anderson
26bb50ab48 Add an insertBefore method for attaching previously unattached instructions,
such as those created by clone(), to a basic block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52424 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 18:29:27 +00:00
Owen Anderson
2b7470eb54 Fix use of placement new to actually use an address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52423 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 18:07:43 +00:00
Evan Cheng
95350b9cd2 It's not safe to remove SUBREG_TO_REG that looks like identity copies, e.g. movl %eax, %eax on x86-64 actually does a zero-extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52421 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 17:59:16 +00:00
Anton Korobeynikov
0b725f17e0 Add one more 'magic' define :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52420 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 17:57:43 +00:00
Anton Korobeynikov
7a17ff7b3f Unbreak non-PPC builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 17:38:31 +00:00
Anton Korobeynikov
210539ebc4 Provide generic hooks for icache invalidation. Add PPC implementation.
Patch by Gary Benson!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52418 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 17:30:05 +00:00
Chris Lattner
fc329f4fa1 revert recent patch which is causing widespread breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52415 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 17:06:43 +00:00
Evan Cheng
1b088f3310 Don't forget to initialize SymbolSearchingDisabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52414 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 16:49:02 +00:00
Duncan Sands
34b176a181 Fix typo that changed the logic to something wrong.
Spotted by Nick Lewycky.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52411 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 15:55:30 +00:00
Duncan Sands
69b01e92a2 Split type expansion into ExpandInteger and ExpandFloat
rather than bundling them together.  Rename FloatToInt
to PromoteFloat (better, if not perfect).  Reorganize
files by types rather than by operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52408 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-17 14:27:01 +00:00