Avoid calling removeVirtualRegisterKilled which iterates over the operands

to find the kill, since we already have the operand.

llvm-svn: 80736
This commit is contained in:
Bob Wilson 2009-09-01 23:18:46 +00:00
parent 5083e2623b
commit fcd618bf1d
1 changed files with 2 additions and 1 deletions

View File

@ -1032,7 +1032,8 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
if (KillMO) {
if (!FirstKeptMO) {
// All uses of regB are being replaced; move the kill to prevMI.
if (LV && LV->removeVirtualRegisterKilled(regB, mi))
KillMO->setIsKill(false);
if (LV && LV->getVarInfo(regB).removeKill(mi))
LV->addVirtualRegisterKilled(regB, prevMI);
} else {
if (!KillMOKept) {