Commit Graph

23 Commits

Author SHA1 Message Date
Evan Cheng
1ea7327845 Fixed a stack slot coloring with reg bug: do not update implicit use / def when doing forward / backward propagation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-12 18:31:57 +00:00
Evan Cheng
ec51b58b1c Eliminate a compiler warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-11 18:40:35 +00:00
Bill Wendling
2c1d7726f2 Just turn aggressive stack coloring off at -O3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71140 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07 01:33:38 +00:00
Bill Wendling
d0c1f9c932 Temporarily revert r71010. It was causing massive failures during self-hosting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-07 01:27:25 +00:00
Evan Cheng
f9a9b51429 Enable stack coloring with regs at -O3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71010 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-05 20:30:36 +00:00
Evan Cheng
bef60d3804 Do not substitute if the new register isn't in the register class of the operand being updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70953 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-05 00:46:16 +00:00
Evan Cheng
c3806ea3bc Do forward and backward substitution to eliminate loads and stores when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-04 23:13:13 +00:00
Mike Stump
fe095f39e7 Restore minor deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70892 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-04 18:40:41 +00:00
Evan Cheng
04fa35ab13 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70792 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 19:10:11 +00:00
Evan Cheng
c781a243a3 In some rare cases, the register allocator can spill registers but end up not utilizing registers at all. The fundamental problem is linearscan's backtracking can end up freeing more than one allocated registers. However, reloads and restores might be folded into uses / defs and freed registers might not be used at all.
VirtRegMap keeps track of allocations so it knows what's not used. As a horrible hack, the stack coloring can color spill slots with *free* registers. That is, it replace reload and spills with copies from and to the free register. It unfold instructions that load and store the spill slot and replace them with register using variants.

Not yet enabled. This is part 1. More coming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70787 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03 18:32:42 +00:00
Owen Anderson
130abb29cc Enable stack slot coloring DCE. Evan's spiller fixes were needed before this could happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-26 04:47:57 +00:00
Owen Anderson
3d8bde8dfb Add a debugging option for SSC DCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65375 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-24 05:44:18 +00:00
Owen Anderson
3b2c01723c Add a quick pass to the stack slot colorer to eliminate some trivially redundant spills after coloring.
Ideally these would never get created in the first place, but until we enhance the spiller to have a more
global picture of what's happening, this is necessary for code quality in some circumstances.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65120 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-20 09:11:36 +00:00
Dan Gohman
9bf23b5452 Teach StackSlotColoring to update MachineMemOperands when
changing the stack slots on an instruction, to keep them
consistent with the actual memory addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60584 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-05 05:31:14 +00:00
Dan Gohman
26367472a2 Adjust whitespace in debug messages to be more consistent
with other debug messages.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57543 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 02:57:38 +00:00
Dan Gohman
d735b8019b Switch the MachineOperand accessors back to the short names like
isReg, etc., from isRegister, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 15:45:36 +00:00
Evan Cheng
8b56a90bec Instead of setPreservesAll, just mark them preseving machine loop info and machine dominators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56475 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 22:21:38 +00:00
Evan Cheng
bbeeb2a61e Mark several codegen passes as preserving all analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56469 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 20:58:04 +00:00
Dan Gohman
ae73dc1448 Tidy up several unbeseeming casts from pointer to intptr_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 17:05:41 +00:00
Dan Gohman
fdeb4b3f1d Make stack slot coloring's debug output more consistent with
other passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53415 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-10 19:49:32 +00:00
Evan Cheng
d17e44769f Remove option used to debug stack coloring bugs. It's no longer needed since stack coloring is now bug free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52644 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-23 21:24:32 +00:00
Evan Cheng
99ec779a93 Instead of adding an isSS field to LiveInterval to denote stack slot. Use top bit of 'reg' instead. If the top bit is set, than the LiveInterval represents a stack slot live interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52639 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-23 21:03:19 +00:00
Evan Cheng
3f32d65912 Add a stack slot coloring pass. Not yet enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51934 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-04 09:18:41 +00:00