diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-03-14 01:47:49 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-14 01:47:49 +0000 |
commit | 15fda403f36d353b9d4bcfb03377bc74f40dafe5 (patch) | |
tree | 044920133d47b0cca9abd7762cda3751e6cf971a /include/llvm/CodeGen/MachineOperand.h | |
parent | 5922f561c65968ef1865cc8434d191041e450602 (diff) |
Add an MO_Undef MachineOperandType, intended for INSERT_SUBREG. Next up MO_Undead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineOperand.h')
-rw-r--r-- | include/llvm/CodeGen/MachineOperand.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index d62c8f8b47..b4601e18fa 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -33,15 +33,16 @@ class MachineRegisterInfo; class MachineOperand { public: enum MachineOperandType { - MO_Register, // Register operand. - MO_Immediate, // Immediate Operand - MO_FPImmediate, + MO_Register, // Register operand + MO_Immediate, // Immediate operand + MO_FPImmediate, // FP immediate operand MO_MachineBasicBlock, // MachineBasicBlock reference MO_FrameIndex, // Abstract Stack Frame Index MO_ConstantPoolIndex, // Address of indexed Constant in Constant Pool MO_JumpTableIndex, // Address of indexed Jump Table for switch MO_ExternalSymbol, // Name of external global symbol - MO_GlobalAddress // Address of a global value + MO_GlobalAddress, // Address of a global value + MO_Undef // Undef }; private: @@ -130,6 +131,7 @@ public: bool isJumpTableIndex() const { return OpKind == MO_JumpTableIndex; } bool isGlobalAddress() const { return OpKind == MO_GlobalAddress; } bool isExternalSymbol() const { return OpKind == MO_ExternalSymbol; } + bool isUndef() const { return OpKind == MO_Undef; } bool isReg() const { return OpKind == MO_Register; } bool isImm() const { return OpKind == MO_Immediate; } @@ -375,6 +377,11 @@ public: Op.setOffset(Offset); return Op; } + static MachineOperand CreateUndef() { + MachineOperand Op(MachineOperand::MO_Undef); + return Op; + } + const MachineOperand &operator=(const MachineOperand &MO) { OpKind = MO.OpKind; IsDef = MO.IsDef; |