X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FCodeGen%2FMachineOperand.h;h=606833cd4081090f0bcff80d4b1583fa7a6bf64b;hb=881a05b46c28299046bd0dc3d0b8c6677e68a4d7;hp=594dc276b0eb4be8af1b926f4c308ebf71205e03;hpb=4ba6916a98fffd9dedac5945ac51d40c8948069e;p=oota-llvm.git diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index 594dc276b0e..606833cd408 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -14,7 +14,6 @@ #ifndef LLVM_CODEGEN_MACHINEOPERAND_H #define LLVM_CODEGEN_MACHINEOPERAND_H -#include "llvm/ADT/Hashing.h" #include "llvm/Support/DataTypes.h" #include @@ -30,6 +29,7 @@ class MachineRegisterInfo; class MDNode; class TargetMachine; class TargetRegisterInfo; +class hash_code; class raw_ostream; class MCSymbol; @@ -70,6 +70,11 @@ private: unsigned char TargetFlags; }; + /// TiedTo - Non-zero when this register operand is tied to another register + /// operand. The encoding of this field is described in the block comment + /// before MachineInstr::tieOperands(). + unsigned char TiedTo : 4; + /// IsDef/IsImp/IsKill/IsDead flags - These are only valid for MO_Register /// operands. @@ -124,14 +129,6 @@ private: /// model the GCC inline asm '&' constraint modifier. bool IsEarlyClobber : 1; - /// IsTied - True if this MO_Register operand is tied to another operand on - /// the instruction. Tied operands form def-use pairs that must be assigned - /// the same physical register by the register allocator, but they will have - /// different virtual registers while the code is in SSA form. - /// - /// See MachineInstr::isRegTiedToUseOperand() and isRegTiedToDefOperand(). - bool IsTied : 1; - /// IsDebug - True if this MO_Register 'use' operand is in a debug pseudo, /// not a real instruction. Such uses should be ignored during codegen. bool IsDebug : 1; @@ -309,7 +306,7 @@ public: bool isTied() const { assert(isReg() && "Wrong MachineOperand accessor"); - return IsTied; + return TiedTo; } bool isDebug() const { @@ -390,11 +387,6 @@ public: IsEarlyClobber = Val; } - void setIsTied(bool Val = true) { - assert(isReg() && "Wrong MachineOperand accessor"); - IsTied = Val; - } - void setIsDebug(bool Val = true) { assert(isReg() && IsDef && "Wrong MachineOperand accessor"); IsDebug = Val; @@ -577,7 +569,7 @@ public: Op.IsUndef = isUndef; Op.IsInternalRead = isInternalRead; Op.IsEarlyClobber = isEarlyClobber; - Op.IsTied = false; + Op.TiedTo = 0; Op.IsDebug = isDebug; Op.SmallContents.RegNo = Reg; Op.Contents.Reg.Prev = 0; @@ -636,11 +628,11 @@ public: Op.setTargetFlags(TargetFlags); return Op; } - static MachineOperand CreateBA(const BlockAddress *BA, + static MachineOperand CreateBA(const BlockAddress *BA, int64_t Offset, unsigned char TargetFlags = 0) { MachineOperand Op(MachineOperand::MO_BlockAddress); Op.Contents.OffsetedInfo.Val.BA = BA; - Op.setOffset(0); // Offset is always 0. + Op.setOffset(Offset); Op.setTargetFlags(TargetFlags); return Op; } @@ -695,6 +687,9 @@ inline raw_ostream &operator<<(raw_ostream &OS, const MachineOperand& MO) { return OS; } + // See friend declaration above. This additional declaration is required in + // order to compile LLVM with IBM xlC compiler. + hash_code hash_value(const MachineOperand &MO); } // End llvm namespace #endif