[llvm-commits] [llvm] r120841 - /llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Dec 3 13:47:08 PST 2010
Author: stoklund
Date: Fri Dec 3 15:47:08 2010
New Revision: 120841
URL: http://llvm.org/viewvc/llvm-project?rev=120841&view=rev
Log:
Also update virtRegMap when renaming virtual registers.
Modified:
llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=120841&r1=120840&r2=120841&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Fri Dec 3 15:47:08 2010
@@ -583,8 +583,18 @@
void LDVImpl::
renameRegister(unsigned OldReg, unsigned NewReg, unsigned SubIdx) {
- for (UserValue *UV = lookupVirtReg(OldReg); UV; UV = UV->getNext())
+ UserValue *UV = lookupVirtReg(OldReg);
+ if (!UV)
+ return;
+
+ if (TargetRegisterInfo::isVirtualRegister(NewReg))
+ mapVirtReg(NewReg, UV);
+ virtRegMap.erase(OldReg);
+
+ do {
UV->renameRegister(OldReg, NewReg, SubIdx, TRI);
+ UV = UV->getNext();
+ } while (UV);
}
void LiveDebugVariables::
More information about the llvm-commits
mailing list