Keep UsedBlocks info accurate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2007-03-18 09:02:31 +00:00
parent 7e79e396a4
commit e951cd1647
2 changed files with 6 additions and 0 deletions

View File

@@ -198,6 +198,9 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
varInfo.DefInst = prevMi;
// update live variables for regB
LiveVariables::VarInfo& varInfoB = LV.getVarInfo(regB);
// regB is used in this BB.
varInfoB.UsedBlocks[mbbi->getNumber()] = true;
if (LV.removeVirtualRegisterKilled(regB, mbbi, mi))
LV.addVirtualRegisterKilled(regB, prevMi);