17 #ifndef LLVM_CODEGEN_REGISTERCLASSINFO_H 18 #define LLVM_CODEGEN_REGISTERCLASSINFO_H 35 bool ProperSubClass =
false;
37 uint16_t LastCostChange = 0;
38 std::unique_ptr<MCPhysReg[]> Order;
48 std::unique_ptr<RCInfo[]> RegClass;
60 const MCPhysReg *CalleeSavedRegs =
nullptr;
68 std::unique_ptr<unsigned[]> PSetLimits;
75 const RCInfo &RCI = RegClass[RC->
getID()];
91 return get(RC).NumRegs;
108 return get(RC).ProperSubClass;
115 if (PhysReg < CalleeSavedAliases.
size())
116 return CalleeSavedAliases[PhysReg];
124 return get(RC).MinCost;
132 return get(RC).LastCostChange;
139 if (!PSetLimits[Idx])
141 return PSetLimits[Idx];
150 #endif // LLVM_CODEGEN_REGISTERCLASSINFO_H ArrayRef< MCPhysReg > getOrder(const TargetRegisterClass *RC) const
getOrder - Returns the preferred allocation order for RC.
Compute iterated dominance frontiers using a linear time algorithm.
unsigned computePSetLimit(unsigned Idx) const
This is not accurate because two overlapping register sets may have some nonoverlapping reserved regi...
unsigned const TargetRegisterInfo * TRI
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.
unsigned getID() const
Return the register class ID number.
unsigned getLastCostChange(const TargetRegisterClass *RC)
Get the position of the last cost change in getOrder(RC).
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
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.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
unsigned getLastCalleeSavedAlias(unsigned PhysReg) const
getLastCalleeSavedAlias - Returns the last callee saved register that overlaps PhysReg, or 0 if Reg doesn't overlap a CalleeSavedAliases.
unsigned getMinCost(const TargetRegisterClass *RC)
Get the minimum register cost in RC's allocation order.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isProperSubClass(const TargetRegisterClass *RC) const
isProperSubClass - Returns true if RC has a legal super-class with more allocatable registers...