LLVM 17.0.0git
|
Wrapper class representing physical registers. Should be passed by value. More...
#include "llvm/MC/MCRegister.h"
Public Member Functions | |
constexpr | MCRegister (unsigned Val=0) |
constexpr | operator unsigned () const |
unsigned | id () const |
bool | isValid () const |
bool | operator== (const MCRegister &Other) const |
Comparisons between register objects. | |
bool | operator!= (const MCRegister &Other) const |
bool | operator== (unsigned Other) const |
Comparisons against register constants. | |
bool | operator!= (unsigned Other) const |
bool | operator== (int Other) const |
bool | operator!= (int Other) const |
bool | operator== (MCPhysReg Other) const |
bool | operator!= (MCPhysReg Other) const |
Static Public Member Functions | |
static bool | isStackSlot (unsigned Reg) |
This is the portion of the positive number space that is not a physical register. | |
static bool | isPhysicalRegister (unsigned Reg) |
Return true if the specified register number is in the physical register namespace. | |
static MCRegister | from (unsigned Val) |
Check the provided unsigned value is a valid MCRegister. | |
Static Public Attributes | |
static constexpr unsigned | NoRegister = 0u |
static constexpr unsigned | FirstPhysicalReg = 1u |
static constexpr unsigned | FirstStackSlot = 1u << 30 |
static constexpr unsigned | VirtualRegFlag = 1u << 31 |
Friends | |
hash_code | hash_value (const MCRegister &) |
Wrapper class representing physical registers. Should be passed by value.
Definition at line 24 of file MCRegister.h.
|
inlineconstexpr |
Definition at line 29 of file MCRegister.h.
|
inlinestatic |
Check the provided unsigned value is a valid MCRegister.
Definition at line 67 of file MCRegister.h.
References assert(), isPhysicalRegister(), and NoRegister.
Referenced by llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::VirtRegMap::getPhys(), llvm::rdf::PhysicalRegisterInfo::PhysicalRegisterInfo(), rematerializeCheapDef(), and llvm::SIRegisterInfo::SIRegisterInfo().
|
inline |
Definition at line 72 of file MCRegister.h.
Referenced by llvm::DenseMapInfo< MCRegister >::getHashValue(), llvm::RegisterClassInfo::getLastCalleeSavedAlias(), and llvm::MachineRegisterInfo::isReserved().
Return true if the specified register number is in the physical register namespace.
Definition at line 58 of file MCRegister.h.
References FirstPhysicalReg, and FirstStackSlot.
Referenced by llvm::Register::asMCReg(), from(), llvm::Register::isPhysicalRegister(), and llvm::MCRegUnitIterator::MCRegUnitIterator().
This is the portion of the positive number space that is not a physical register.
StackSlot values do not exist in the MC layer, see Register::isStackSlot() for the more information on them.
Definition at line 52 of file MCRegister.h.
References FirstStackSlot, and VirtualRegFlag.
Referenced by llvm::Register::isStack(), and llvm::Register::isStackSlot().
|
inline |
Definition at line 76 of file MCRegister.h.
References NoRegister.
Referenced by llvm::InterferenceCache::Cursor::setPhysReg().
|
inlineconstexpr |
Definition at line 62 of file MCRegister.h.
|
inline |
Definition at line 80 of file MCRegister.h.
References llvm::Other.
|
inline |
Definition at line 89 of file MCRegister.h.
References llvm::Other.
Definition at line 92 of file MCRegister.h.
References llvm::Other.
Definition at line 87 of file MCRegister.h.
References llvm::Other.
|
inline |
Comparisons between register objects.
Definition at line 79 of file MCRegister.h.
References llvm::Other.
|
inline |
Definition at line 88 of file MCRegister.h.
References llvm::Other.
Definition at line 91 of file MCRegister.h.
References llvm::Other.
Comparisons against register constants.
E.g.
Definition at line 86 of file MCRegister.h.
References llvm::Other.
|
friend |
Definition at line 111 of file MCRegister.h.
|
staticconstexpr |
Definition at line 44 of file MCRegister.h.
Referenced by isPhysicalRegister().
|
staticconstexpr |
Definition at line 45 of file MCRegister.h.
Referenced by llvm::Register::index2StackSlot(), isPhysicalRegister(), isStackSlot(), and llvm::Register::stackSlot2Index().
|
staticconstexpr |
Definition at line 43 of file MCRegister.h.
Referenced by llvm::Register::asMCReg(), from(), llvm::RegisterClassInfo::getLastCalleeSavedAlias(), llvm::LiveRegMatrix::getOneVReg(), llvm::X86RegisterInfo::getRegAllocationHints(), llvm::TargetLoweringObjectFile::getStaticBase(), isCandidate(), llvm::Register::isValid(), and isValid().
|
staticconstexpr |
Definition at line 46 of file MCRegister.h.
Referenced by llvm::Register::index2VirtReg(), isStackSlot(), and llvm::Register::isVirtualRegister().