class TargetRegisterClass
Declaration
class TargetRegisterClass { /* full declaration omitted */ };
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:45
Member Variables
- public const llvm::MCRegisterClass* MC
- public const uint32_t* SubClassMask
- public const uint16_t* SuperRegIndices
- public const llvm::LaneBitmask LaneMask
- public const uint8_t AllocationPriority
- Classes with a higher priority value are assigned first by register allocators using a greedy heuristic. The value is in the range [0,63]. Values >= 32 should be used with care since they may overlap with other fields in the allocator's priority heuristics.
- public const uint8_t TSFlags
- Configurable target specific flags.
- public const bool HasDisjunctSubRegs
- Whether the class supports two (or more) disjunct subregister indices.
- public const bool CoveredBySubRegs
- Whether a combination of subregisters can cover every register in the class. See also the CoveredBySubRegs description in Target.td.
- public const llvm::TargetRegisterClass::sc_iterator SuperClasses
- public ArrayRef<llvm::MCPhysReg> (*)( const llvm::MachineFunction&) OrderFunc
Method Overview
- public llvm::TargetRegisterClass::iterator begin() const
- public bool contains(llvm::Register Reg1, llvm::Register Reg2) const
- public bool contains(llvm::Register Reg) const
- public llvm::TargetRegisterClass::iterator end() const
- public int getCopyCost() const
- public unsigned int getID() const
- public llvm::LaneBitmask getLaneMask() const
- public unsigned int getNumRegs() const
- public ArrayRef<llvm::MCPhysReg> getRawAllocationOrder(const llvm::MachineFunction & MF) const
- public llvm::MCRegister getRegister(unsigned int i) const
- public iterator_range<SmallVectorImpl<MCPhysReg>::const_iterator> getRegisters() const
- public const uint32_t * getSubClassMask() const
- public llvm::TargetRegisterClass::sc_iterator getSuperClasses() const
- public const uint16_t * getSuperRegIndices() const
- public bool hasSubClass(const llvm::TargetRegisterClass * RC) const
- public bool hasSubClassEq(const llvm::TargetRegisterClass * RC) const
- public bool hasSuperClass(const llvm::TargetRegisterClass * RC) const
- public bool hasSuperClassEq(const llvm::TargetRegisterClass * RC) const
- public bool isASubClass() const
- public bool isAllocatable() const
Methods
¶llvm::TargetRegisterClass::iterator begin() const
llvm::TargetRegisterClass::iterator begin() const
Description
begin/end - Return all of the registers in this class.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:76
¶bool contains(llvm::Register Reg1,
llvm::Register Reg2) const
bool contains(llvm::Register Reg1,
llvm::Register Reg2) const
Description
Return true if both registers are in this class.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:103
Parameters
- llvm::Register Reg1
- llvm::Register Reg2
¶bool contains(llvm::Register Reg) const
bool contains(llvm::Register Reg) const
Description
Return true if the specified register is included in this register class. This does not include virtual registers.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:94
Parameters
- llvm::Register Reg
¶llvm::TargetRegisterClass::iterator end() const
llvm::TargetRegisterClass::iterator end() const
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:77
¶int getCopyCost() const
int getCopyCost() const
Description
Return the cost of copying a value between two registers in this class. A negative number means the register class is very expensive to copy e.g. status flag register classes.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:114
¶unsigned int getID() const
unsigned int getID() const
Description
Return the register class ID number.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:72
¶llvm::LaneBitmask getLaneMask() const
llvm::LaneBitmask getLaneMask() const
Description
Returns the combination of all lane masks of register in this class. The lane masks of the registers are the combination of all lane masks of their subregisters. Returns 1 if there are no subregisters.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:207
¶unsigned int getNumRegs() const
unsigned int getNumRegs() const
Description
Return the number of registers in this class.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:80
¶ArrayRef<llvm::MCPhysReg> getRawAllocationOrder(
const llvm::MachineFunction& MF) const
ArrayRef<llvm::MCPhysReg> getRawAllocationOrder(
const llvm::MachineFunction& MF) const
Description
Returns the preferred order for allocating registers from this register class in MF. The raw order comes directly from the .td file and may include reserved registers that are not allocatable. Register allocators should also make sure to allocate callee-saved registers only after all the volatiles are used. The RegisterClassInfo class provides filtered allocation orders with callee-saved registers moved to the end. The MachineFunction argument can be used to tune the allocatable registers based on the characteristics of the function, subtarget, or other criteria. By default, this method returns all registers in the class.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:200
Parameters
- const llvm::MachineFunction& MF
¶llvm::MCRegister getRegister(unsigned int i) const
llvm::MCRegister getRegister(unsigned int i) const
Description
Return the specified register in the class.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:88
Parameters
- unsigned int i
¶iterator_range<
SmallVectorImpl<MCPhysReg>::const_iterator>
getRegisters() const
iterator_range<
SmallVectorImpl<MCPhysReg>::const_iterator>
getRegisters() const
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:83
¶const uint32_t* getSubClassMask() const
const uint32_t* getSubClassMask() const
Description
I.e., the representation of the memory from left to right at the bit level looks like: [31 30 ... 1 0] [ 63 62 ... 33 32] ... [ XXX NumRegClasses NumRegClasses - 1 ... ] Where the number represents the class ID and XXX bits that should be ignored. See the implementation of hasSubClassEq for an example of how it can be used.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:159
¶llvm::TargetRegisterClass::sc_iterator
getSuperClasses() const
llvm::TargetRegisterClass::sc_iterator
getSuperClasses() const
Description
Returns a NULL-terminated list of super-classes. The classes are ordered by ID which is also a topological ordering from large to small classes. The list does NOT include the current class.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:177
¶const uint16_t* getSuperRegIndices() const
const uint16_t* getSuperRegIndices() const
Description
Returns a 0-terminated list of sub-register indices that project some super-register class into this register class. The list has an entry for each Idx such that: There exists SuperRC where: For all Reg in SuperRC: this->contains(Reg:Idx)
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:170
¶bool hasSubClass(
const llvm::TargetRegisterClass* RC) const
bool hasSubClass(
const llvm::TargetRegisterClass* RC) const
Description
Return true if the specified TargetRegisterClass is a proper sub-class of this TargetRegisterClass.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:122
Parameters
- const llvm::TargetRegisterClass* RC
¶bool hasSubClassEq(
const llvm::TargetRegisterClass* RC) const
bool hasSubClassEq(
const llvm::TargetRegisterClass* RC) const
Description
Returns true if RC is a sub-class of or equal to this class.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:127
Parameters
- const llvm::TargetRegisterClass* RC
¶bool hasSuperClass(
const llvm::TargetRegisterClass* RC) const
bool hasSuperClass(
const llvm::TargetRegisterClass* RC) const
Description
Return true if the specified TargetRegisterClass is a proper super-class of this TargetRegisterClass.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:134
Parameters
- const llvm::TargetRegisterClass* RC
¶bool hasSuperClassEq(
const llvm::TargetRegisterClass* RC) const
bool hasSuperClassEq(
const llvm::TargetRegisterClass* RC) const
Description
Returns true if RC is a super-class of or equal to this class.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:139
Parameters
- const llvm::TargetRegisterClass* RC
¶bool isASubClass() const
bool isASubClass() const
Description
Return true if this TargetRegisterClass is a subset class of at least one other TargetRegisterClass.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:183
¶bool isAllocatable() const
bool isAllocatable() const
Description
Return true if this register class may be used to create virtual registers.
Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:118