summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-02-27 03:04:06 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-02-27 03:04:06 +0000
commit6d56368cafb5e277842e22247eae8ecc563cb630 (patch)
tree907d4efa34819fed76777a42ef6b1dfb0b3fcfdd /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parent66272a545b899de017d4d7a2dd1f7f734a36e76d (diff)
downloadbcm5719-llvm-6d56368cafb5e277842e22247eae8ecc563cb630.tar.gz
bcm5719-llvm-6d56368cafb5e277842e22247eae8ecc563cb630.zip
Spiller now remove unused spill slots.
llvm-svn: 47657
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 716c3701102..00ba2e770b0 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -764,6 +764,9 @@ bool LiveIntervals::tryFoldMemoryOperand(MachineInstr* &MI,
MachineInstr *fmi = isSS ? tii_->foldMemoryOperand(*mf_, MI, FoldOps, Slot)
: tii_->foldMemoryOperand(*mf_, MI, FoldOps, DefMI);
if (fmi) {
+ // Remember this instruction uses the spill slot.
+ if (isSS) vrm.addSpillSlotUse(Slot, fmi);
+
// Attempt to fold the memory reference into the instruction. If
// we can do this, we don't need to insert spill code.
if (lv_)
OpenPOWER on IntegriCloud