From 815b635639ec0523e269b88d9de40aac18fa794e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Oct 2004 23:16:43 +0000 Subject: [PATCH] Do not repeat the map lookup llvm-svn: 16633 --- lib/CodeGen/VirtRegMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index bdea59b53a5..4608cdeaf53 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -449,7 +449,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) { std::map::iterator MDSI = MaybeDeadStores.find(SS); if (MDSI != MaybeDeadStores.end()) { if (MR & VirtRegMap::isRef) // Previous store is not dead. - MaybeDeadStores.erase(SS); + MaybeDeadStores.erase(MDSI); else { // If we get here, the store is dead, nuke it now. assert(MR == VirtRegMap::isMod && "Can't be modref!");