diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2009-09-01 23:18:46 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2009-09-01 23:18:46 +0000 |
| commit | fcd618bf1d988315c935175008d3cad229677a37 (patch) | |
| tree | 56ca4df4ac3e4481641de2beb7f50f5b4dd53e9c /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
| parent | 5083e2623bb99c533d1c80553be374a8a1fa137f (diff) | |
| download | bcm5719-llvm-fcd618bf1d988315c935175008d3cad229677a37.tar.gz bcm5719-llvm-fcd618bf1d988315c935175008d3cad229677a37.zip | |
Avoid calling removeVirtualRegisterKilled which iterates over the operands
to find the kill, since we already have the operand.
llvm-svn: 80736
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index b50d53ce59b..1938b4bd369 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -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) { |

