Changes in directory llvm/lib/CodeGen:
PHIElimination.cpp updated: 1.54 -> 1.55 TwoAddressInstructionPass.cpp updated: 1.45 -> 1.46 --- Log message: Keep UsedBlocks info accurate. --- Diffs of the changes: (+6 -0) PHIElimination.cpp | 3 +++ TwoAddressInstructionPass.cpp | 3 +++ 2 files changed, 6 insertions(+) Index: llvm/lib/CodeGen/PHIElimination.cpp diff -u llvm/lib/CodeGen/PHIElimination.cpp:1.54 llvm/lib/CodeGen/PHIElimination.cpp:1.55 --- llvm/lib/CodeGen/PHIElimination.cpp:1.54 Wed Jan 31 23:31:50 2007 +++ llvm/lib/CodeGen/PHIElimination.cpp Sun Mar 18 04:02:31 2007 @@ -160,6 +160,8 @@ // Realize that the destination register is defined by the PHI copy now, not // the PHI itself. LV->getVarInfo(DestReg).DefInst = PHICopy; + + LV->getVarInfo(IncomingReg).UsedBlocks[MBB.getNumber()] = true; } // Adjust the VRegPHIUseCount map to account for the removal of this PHI @@ -210,6 +212,7 @@ // instruction kills the incoming value. // LiveVariables::VarInfo &InRegVI = LV->getVarInfo(SrcReg); + InRegVI.UsedBlocks[opBlock.getNumber()] = true; // Loop over all of the successors of the basic block, checking to see // if the value is either live in the block, or if it is killed in the Index: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp diff -u llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.45 llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.46 --- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.45 Tue Dec 19 16:41:21 2006 +++ llvm/lib/CodeGen/TwoAddressInstructionPass.cpp Sun Mar 18 04:02:31 2007 @@ -198,6 +198,9 @@ 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); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits