Go to the documentation of this file.
16 #ifndef LLVM_CODEGEN_REGISTERCLASSINFO_H
17 #define LLVM_CODEGEN_REGISTERCLASSINFO_H
33 bool ProperSubClass =
false;
36 std::unique_ptr<MCPhysReg[]> Order;
46 std::unique_ptr<RCInfo[]> RegClass;
58 const MCPhysReg *CalleeSavedRegs =
nullptr;
70 std::unique_ptr<unsigned[]> PSetLimits;
80 const RCInfo &RCI = RegClass[RC->
getID()];
96 return get(RC).NumRegs;
113 return get(RC).ProperSubClass;
120 if (PhysReg.
id() < CalleeSavedAliases.size())
121 return CalleeSavedAliases[PhysReg];
129 return get(RC).MinCost;
137 return get(RC).LastCostChange;
144 if (!PSetLimits[Idx])
146 return PSetLimits[Idx];
155 #endif // LLVM_CODEGEN_REGISTERCLASSINFO_H
unsigned getID() const
Return the register class ID number.
This is an optimization pass for GlobalISel generic memory operations.
ArrayRef< MCPhysReg > getOrder(const TargetRegisterClass *RC) const
getOrder - Returns the preferred allocation order for RC.
unsigned getLastCostChange(const TargetRegisterClass *RC) const
Get the position of the last cost change in getOrder(RC).
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
static constexpr unsigned NoRegister
uint8_t getMinCost(const TargetRegisterClass *RC) const
Get the minimum register cost in RC's allocation order.
bool isProperSubClass(const TargetRegisterClass *RC) const
isProperSubClass - Returns true if RC has a legal super-class with more allocatable registers.
unsigned getNumAllocatableRegs(const TargetRegisterClass *RC) const
getNumAllocatableRegs - Returns the number of actually allocatable registers in RC in the current fun...
void runOnMachineFunction(const MachineFunction &MF)
runOnFunction - Prepare to answer questions about MF.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
unsigned getRegPressureSetLimit(unsigned Idx) const
Get the register unit limit for the given pressure set index.
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
MCRegister getLastCalleeSavedAlias(MCRegister PhysReg) const
getLastCalleeSavedAlias - Returns the last callee saved register that overlaps PhysReg,...
unsigned computePSetLimit(unsigned Idx) const
This is not accurate because two overlapping register sets may have some nonoverlapping reserved regi...
Wrapper class representing physical registers. Should be passed by value.