summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-09-01 23:18:46 +0000
committerBob Wilson <bob.wilson@apple.com>2009-09-01 23:18:46 +0000
commitfcd618bf1d988315c935175008d3cad229677a37 (patch)
tree56ca4df4ac3e4481641de2beb7f50f5b4dd53e9c /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
parent5083e2623bb99c533d1c80553be374a8a1fa137f (diff)
downloadbcm5719-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.cpp3
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) {
OpenPOWER on IntegriCloud