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 | 9fe7602862328c0081106709e0a8f03316dc845b (patch) | |
tree | 9194cced66c365831953adbf786ac76789ad0637 /lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | cc6a1290fc91716f7d81a637171cae59678f1f6c (diff) | |
download | external_llvm-9fe7602862328c0081106709e0a8f03316dc845b.zip external_llvm-9fe7602862328c0081106709e0a8f03316dc845b.tar.gz external_llvm-9fe7602862328c0081106709e0a8f03316dc845b.tar.bz2 |
Revert changes. Will implement this using a different set of primitives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11091 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | lib/CodeGen/TwoAddressInstructionPass.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index ecd22ab..991be42 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/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() == |