Add an assertion, update DefInst even though no one uses it (dangling pointers

don't help anyone)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25081 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-01-04 06:47:48 +00:00
parent dacceef266
commit 172c362fef
2 changed files with 5 additions and 0 deletions

View File

@ -145,6 +145,10 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
LV->addVirtualRegisterDead(DestReg, PHICopy);
LV->removeVirtualRegistersDead(MPhi);
}
// Realize that the destination register is defined by the PHI copy now, not
// the PHI itself.
LV->getVarInfo(DestReg).DefInst = PHICopy;
}
// Adjust the VRegPHIUseCount map to account for the removal of this PHI

View File

@ -393,6 +393,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
// Otherwise, reload it and remember that we have it.
PhysReg = VRM.getPhys(VirtReg);
assert(PhysReg && "Must map virtreg to physreg!");
const TargetRegisterClass* RC =
MBB.getParent()->getSSARegMap()->getRegClass(VirtReg);