9 #ifndef LLVM_CODEGEN_REGISTER_H 10 #define LLVM_CODEGEN_REGISTER_H 52 return int(Reg - (1u << 30));
57 assert(FI >= 0 &&
"Cannot hold a negative frame index.");
58 return FI + (1u << 30);
78 return Reg & ~(1u << 31);
84 return Index | (1u << 31);
109 unsigned id()
const {
return Reg; }
156 #endif // ifndef LLVM_CODEGEN_REGISTER_H Wrapper class representing physical registers. Should be passed by value.
bool operator!=(MCPhysReg Other) const
static unsigned virtReg2Index(unsigned Reg)
Convert a virtual register number to a 0-based index.
unsigned virtRegIndex() const
Convert a virtual register number to a 0-based index.
This class represents lattice values for constants.
static bool isEqual(const Register &LHS, const Register &RHS)
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
static bool isStackSlot(unsigned Reg)
isStackSlot - Sometimes it is useful the be able to store a non-negative frame index in a variable th...
bool operator!=(const Register &Other) const
static unsigned index2VirtReg(unsigned Index)
Convert a 0-based index to a virtual register number.
bool operator==(int Other) const
bool operator==(MCPhysReg Other) const
bool operator!=(unsigned Other) const
static bool isEqual(const Function &Caller, const Function &Callee)
static unsigned getTombstoneKey()
bool isPhysical() const
Return true if the specified register number is in the physical register namespace.
bool isVirtual() const
Return true if the specified register number is in the virtual register namespace.
static unsigned index2StackSlot(int FI)
Convert a non-negative frame index to a stack slot register value.
bool operator==(const MCRegister &Other) const
static int stackSlot2Index(unsigned Reg)
Compute the frame index from a register value representing a stack slot.
static bool isStackSlot(unsigned Reg)
This is the portion of the positive number space that is not a physical register. ...
bool operator!=(int Other) const
bool operator!=(const MCRegister &Other) const
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
bool operator==(const Register &Other) const
Comparisons between register objects.
bool operator==(unsigned Other) const
Comparisons against register constants.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static bool isVirtualRegister(unsigned Reg)
Return true if the specified register number is in the virtual register namespace.
static unsigned getEmptyKey()
static unsigned getHashValue(const Register &Val)
Wrapper class representing virtual and physical registers.