aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-15 11:03:03 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-15 11:03:03 +0000
commit7a1e872564a65a8494412d72e15c2f48735d32ab (patch)
tree673b4b439f7ac57ad80f1ca2ccb0c4616a1aa32c /lib/CodeGen
parentc4f661e3dec2e574a59d32bef8679af832349fd2 (diff)
downloadexternal_llvm-7a1e872564a65a8494412d72e15c2f48735d32ab.zip
external_llvm-7a1e872564a65a8494412d72e15c2f48735d32ab.tar.gz
external_llvm-7a1e872564a65a8494412d72e15c2f48735d32ab.tar.bz2
Update LocalRewriter::DistanceMap when inserting stack loads.
In the included test case, a stack load was not included in DistanceMap. That caused TransferDeadness to ignore the instruction, leading to a scavenger assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/VirtRegRewriter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/VirtRegRewriter.cpp b/lib/CodeGen/VirtRegRewriter.cpp
index b34d43a..3e651a5 100644
--- a/lib/CodeGen/VirtRegRewriter.cpp
+++ b/lib/CodeGen/VirtRegRewriter.cpp
@@ -1587,6 +1587,7 @@ private:
MachineInstr *LoadMI = prior(InsertLoc);
VRM.addSpillSlotUse(SS, LoadMI);
++NumPSpills;
+ DistanceMap.insert(std::make_pair(LoadMI, Dist++));
}
NextMII = next(MII);
}
@@ -1678,6 +1679,7 @@ private:
MachineInstr *LoadMI = prior(InsertLoc);
VRM.addSpillSlotUse(SSorRMId, LoadMI);
++NumLoads;
+ DistanceMap.insert(std::make_pair(LoadMI, Dist++));
}
// This invalidates Phys.
@@ -1977,6 +1979,7 @@ private:
MachineInstr *LoadMI = prior(InsertLoc);
VRM.addSpillSlotUse(SSorRMId, LoadMI);
++NumLoads;
+ DistanceMap.insert(std::make_pair(LoadMI, Dist++));
}
// This invalidates PhysReg.
Spills.ClobberPhysReg(PhysReg);