diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-04 22:17:40 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-04 22:17:40 +0000 |
commit | 14be64018fb38d1fa535b9cd12d11371f4eba3b5 (patch) | |
tree | 2c3d0a9d629d6c3998e976920255848c298d4d42 /include/llvm/CodeGen/MachineInstr.h | |
parent | a33ceaa2d46f6bf50c979e28581d9e4941b45d44 (diff) |
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
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index f76da2fa4a..32e728436c 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -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 { |