[llvm-commits] [llvm] r80736 - /llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Bob Wilson
bob.wilson at apple.com
Tue Sep 1 16:18:46 PDT 2009
Author: bwilson
Date: Tue Sep 1 18:18:46 2009
New Revision: 80736
URL: http://llvm.org/viewvc/llvm-project?rev=80736&view=rev
Log:
Avoid calling removeVirtualRegisterKilled which iterates over the operands
to find the kill, since we already have the operand.
Modified:
llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=80736&r1=80735&r2=80736&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Tue Sep 1 18:18:46 2009
@@ -1032,7 +1032,8 @@
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) {
More information about the llvm-commits
mailing list