summaryrefslogtreecommitdiff
path: root/lib/CodeGen/Spiller.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-06-30 18:19:08 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-06-30 18:19:08 +0000
commit61e4a0bc10fa1d36d58935d42d248180993d65bb (patch)
tree7a28d2e9d9a76358c491d8399519f5d3151d3a08 /lib/CodeGen/Spiller.cpp
parent130acd15fcf2f085bc08313904897fee7a4990ec (diff)
downloadllvm-61e4a0bc10fa1d36d58935d42d248180993d65bb.tar.gz
llvm-61e4a0bc10fa1d36d58935d42d248180993d65bb.tar.bz2
llvm-61e4a0bc10fa1d36d58935d42d248180993d65bb.tar.xz
Remember to track spill slot uses in VirtRegMap when inserting loads and stores.
LocalRewriter::runOnMachineFunction uses this information to mark dead spill slots. This means that InlineSpiller now also works for functions that spill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107302 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Spiller.cpp')
-rw-r--r--lib/CodeGen/Spiller.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/Spiller.cpp b/lib/CodeGen/Spiller.cpp
index ad65e9f4b2..19987afef1 100644
--- a/lib/CodeGen/Spiller.cpp
+++ b/lib/CodeGen/Spiller.cpp
@@ -137,6 +137,7 @@ protected:
MachineInstr *loadInstr(prior(miItr));
SlotIndex loadIndex =
lis->InsertMachineInstrInMaps(loadInstr).getDefIndex();
+ vrm->addSpilSlotUse(ss, loadInstr);
SlotIndex endIndex = loadIndex.getNextIndex();
VNInfo *loadVNI =
newLI->getNextValue(loadIndex, 0, true, lis->getVNInfoAllocator());
@@ -150,6 +151,7 @@ protected:
MachineInstr *storeInstr(llvm::next(miItr));
SlotIndex storeIndex =
lis->InsertMachineInstrInMaps(storeInstr).getDefIndex();
+ vrm->addSpilSlotUse(ss, storeInstr);
SlotIndex beginIndex = storeIndex.getPrevIndex();
VNInfo *storeVNI =
newLI->getNextValue(beginIndex, 0, true, lis->getVNInfoAllocator());