Also update virtRegMap when renaming virtual registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120841 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2010-12-03 21:47:08 +00:00
parent 41ad0c4c73
commit 8d2584a1d9

View File

@ -583,8 +583,18 @@ renameRegister(unsigned OldReg, unsigned NewReg, unsigned SubIdx,
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::