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
This commit is contained in:
Alkis Evlogimenos committed 2004-02-02 23:08:58 +00:00
1 parent cc6a1290fc
commit 9fe7602862
2 files changed
+3 -12

No files matched your search

-3
View File
@@ -288,9 +288,6 @@ public:
bool isHiBits64 () const { return flags & HIFLAG64; } bool isHiBits64 () const { return flags & HIFLAG64; }
bool isLoBits64 () const { return flags & LOFLAG64; } bool isLoBits64 () const { return flags & LOFLAG64; }
MachineOperand& setUse () { flags |= USEFLAG; return *this; }
MachineOperand& setDef () { flags |= DEFFLAG; return *this; }
// used to check if a machine register has been allocated to this operand // used to check if a machine register has been allocated to this operand
bool hasAllocatedReg() const { bool hasAllocatedReg() const {
return (regNum >= 0 && return (regNum >= 0 &&
+3 -9
View File
@@ -146,17 +146,11 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
LV.addVirtualRegisterDead(regB, &*mbbi, prevMi); LV.addVirtualRegisterDead(regB, &*mbbi, prevMi);
// replace all occurences of regB with regA // 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) { for (unsigned i = 1; i < mi->getNumOperands(); ++i) {
MachineOperand& op = mi->getOperand(i); if (mi->getOperand(i).isRegister() &&
if (op.isRegister()) { mi->getOperand(i).getReg() == regB)
if (op.getReg() == regB) mi->SetMachineOperandReg(i, regA);
mi->SetMachineOperandReg(i, regA);
if (op.getReg() == regA)
op.setDef().setUse();
}
} }
DEBUG(std::cerr << "\t\tmodified original to: "; DEBUG(std::cerr << "\t\tmodified original to: ";
mi->print(std::cerr, TM)); mi->print(std::cerr, TM));
assert(mi->getOperand(0).getAllocatedRegNum() == assert(mi->getOperand(0).getAllocatedRegNum() ==