[llvm-commits] CVS: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Mon Feb 2 17:10:03 PST 2004
Changes in directory llvm/lib/CodeGen:
TwoAddressInstructionPass.cpp updated: 1.10 -> 1.11
---
Log message:
Revert changes. Will implement this using a different set of primitives
---
Diffs of the changes: (+3 -9)
Index: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
diff -u llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.10 llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.11
--- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.10 Mon Feb 2 15:56:40 2004
+++ llvm/lib/CodeGen/TwoAddressInstructionPass.cpp Mon Feb 2 17:08:58 2004
@@ -146,17 +146,11 @@
LV.addVirtualRegisterDead(regB, &*mbbi, prevMi);
// replace all occurences of regB with regA
- // and mark all uses and defs of regA as def&use
for (unsigned i = 1; i < mi->getNumOperands(); ++i) {
- MachineOperand& op = mi->getOperand(i);
- if (op.isRegister()) {
- if (op.getReg() == regB)
- mi->SetMachineOperandReg(i, regA);
- if (op.getReg() == regA)
- op.setDef().setUse();
- }
+ if (mi->getOperand(i).isRegister() &&
+ mi->getOperand(i).getReg() == regB)
+ mi->SetMachineOperandReg(i, regA);
}
-
DEBUG(std::cerr << "\t\tmodified original to: ";
mi->print(std::cerr, TM));
assert(mi->getOperand(0).getAllocatedRegNum() ==
More information about the llvm-commits
mailing list