diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-02 23:08:58 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-02 23:08:58 +0000 |
commit | 74b26f77a3ce4e1748aea16df8634d2d50060163 (patch) | |
tree | 47f09e4eaca92a55671a73260f3ade366363e34d /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | 6e3420565391231ce9bfa49fd200e7108385e353 (diff) | |
download | bcm5719-llvm-74b26f77a3ce4e1748aea16df8634d2d50060163.tar.gz bcm5719-llvm-74b26f77a3ce4e1748aea16df8634d2d50060163.zip |
Revert changes. Will implement this using a different set of primitives
llvm-svn: 11091
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index ecd22abe311..991be42e531 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -146,17 +146,11 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) { 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() == |