From 08f2f0d145f1c2689ff4d1231d5be2f804011a92 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 2 Mar 2007 05:41:42 +0000 Subject: Invalidate last use of a reused register if the use is a deleted noop copy. llvm-svn: 34839 --- llvm/lib/CodeGen/VirtRegMap.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp') diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp index 0f5c48aaa9b..7b8606c3209 100644 --- a/llvm/lib/CodeGen/VirtRegMap.cpp +++ b/llvm/lib/CodeGen/VirtRegMap.cpp @@ -937,6 +937,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) { DOUT << "Removing now-noop copy: " << MI; MBB.erase(&MI); VRM.RemoveFromFoldedVirtMap(&MI); + Spills.UpdateLastUse(Src, NULL); Spills.disallowClobberPhysReg(VirtReg); goto ProcessNextInst; } -- cgit v1.2.3