summaryrefslogtreecommitdiff
path: root/lib/CodeGen
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
commit86f7cd786eecc74e0480c0f8ab6a4234bb72bfbb (patch)
tree165ad223fbe1b5d077aeeb7e38186b445ad7fbad /lib/CodeGen
parent326f43812ca28b2b4bb5eb8e5191deab6ba621f3 (diff)
downloadllvm-86f7cd786eecc74e0480c0f8ab6a4234bb72bfbb.tar.gz
llvm-86f7cd786eecc74e0480c0f8ab6a4234bb72bfbb.tar.bz2
llvm-86f7cd786eecc74e0480c0f8ab6a4234bb72bfbb.tar.xz
Avoid calling removeVirtualRegisterKilled which iterates over the operands
to find the kill, since we already have the operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp
index b50d53ce59..1938b4bd36 100644
--- a/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/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) {