Modify the two address instruction pass to remove the duplicate

operand of the instruction and thus simplify the register allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alkis Evlogimenos committed 2004-02-04 22:17:40 +00:00
1 parent a33ceaa2d4
commit 14be64018f
11 files changed
+227 -232

No files matched your search

+8 -12
View File
@@ -207,10 +207,6 @@ public:
return *this;
}
bool operator==(const MachineOperand& rhs) const {
return regNum == rhs.regNum && opType == rhs.opType;
}
// Accessor methods. Caller is responsible for checking the
// operand type before invoking the corresponding accessor.
//
@@ -285,14 +281,14 @@ public:
return *SymbolName;
}
bool isUse () const { return flags & USEFLAG; }
bool isEverUsed (const MachineInstr&) const;
bool isDef () const { return flags & DEFFLAG; }
bool isHiBits32 () const { return flags & HIFLAG32; }
bool isEverDefined (const MachineInstr&) const;
bool isLoBits32 () const { return flags & LOFLAG32; }
bool isHiBits64 () const { return flags & HIFLAG64; }
bool isLoBits64 () const { return flags & LOFLAG64; }
bool isUse () const { return flags & USEFLAG; }
MachineOperand& setUse () { flags |= USEFLAG; return *this; }
bool isDef () const { return flags & DEFFLAG; }
MachineOperand& setDef () { flags |= DEFFLAG; return *this; }
bool isHiBits32 () const { return flags & HIFLAG32; }
bool isLoBits32 () const { return flags & LOFLAG32; }
bool isHiBits64 () const { return flags & HIFLAG64; }
bool isLoBits64 () const { return flags & LOFLAG64; }
// used to check if a machine register has been allocated to this operand
bool hasAllocatedReg() const {