diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-06-30 18:19:08 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-06-30 18:19:08 +0000 |
commit | 61e4a0bc10fa1d36d58935d42d248180993d65bb (patch) | |
tree | 7a28d2e9d9a76358c491d8399519f5d3151d3a08 /lib/CodeGen/InlineSpiller.cpp | |
parent | 130acd15fcf2f085bc08313904897fee7a4990ec (diff) | |
download | external_llvm-61e4a0bc10fa1d36d58935d42d248180993d65bb.zip external_llvm-61e4a0bc10fa1d36d58935d42d248180993d65bb.tar.gz external_llvm-61e4a0bc10fa1d36d58935d42d248180993d65bb.tar.bz2 |
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/InlineSpiller.cpp')
-rw-r--r-- | lib/CodeGen/InlineSpiller.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/InlineSpiller.cpp b/lib/CodeGen/InlineSpiller.cpp index a7a774d..2c9ea19 100644 --- a/lib/CodeGen/InlineSpiller.cpp +++ b/lib/CodeGen/InlineSpiller.cpp @@ -95,6 +95,7 @@ void InlineSpiller::spill(LiveInterval *li, tii_.loadRegFromStackSlot(*MI->getParent(), MII, NewVReg, SS, RC, &tri_); --MII; // Point to load instruction. SlotIndex LoadIdx = lis_.InsertMachineInstrInMaps(MII).getDefIndex(); + vrm_.addSpillSlotUse(SS, MII); DEBUG(dbgs() << "\treload: " << LoadIdx << '\t' << *MII); VNInfo *LoadVNI = NewLI.getNextValue(LoadIdx, 0, true, lis_.getVNInfoAllocator()); @@ -124,6 +125,7 @@ void InlineSpiller::spill(LiveInterval *li, &tri_); --MII; // Point to store instruction. SlotIndex StoreIdx = lis_.InsertMachineInstrInMaps(MII).getDefIndex(); + vrm_.addSpillSlotUse(SS, MII); DEBUG(dbgs() << "\tspilled: " << StoreIdx << '\t' << *MII); VNInfo *StoreVNI = NewLI.getNextValue(Idx, 0, true, lis_.getVNInfoAllocator()); |