16 #ifndef LLVM_CODEGEN_REGISTERCLASSINFO_H 17 #define LLVM_CODEGEN_REGISTERCLASSINFO_H 34 bool ProperSubClass =
false;
37 std::unique_ptr<MCPhysReg[]> Order;
47 std::unique_ptr<RCInfo[]> RegClass;
59 const MCPhysReg *CalleeSavedRegs =
nullptr;
67 std::unique_ptr<unsigned[]> PSetLimits;
74 const RCInfo &RCI = RegClass[RC->
getID()];
90 return get(RC).NumRegs;
107 return get(RC).ProperSubClass;
114 if (PhysReg < CalleeSavedAliases.
size())
115 return CalleeSavedAliases[PhysReg];
123 return get(RC).MinCost;
131 return get(RC).LastCostChange;
138 if (!PSetLimits[Idx])
140 return PSetLimits[Idx];
149 #endif // LLVM_CODEGEN_REGISTERCLASSINFO_H ArrayRef< MCPhysReg > getOrder(const TargetRegisterClass *RC) const
getOrder - Returns the preferred allocation order for RC.
This class represents lattice values for constants.
static bool isPhysicalRegister(unsigned Reg)
Return true if the specified register number is in the physical register namespace.
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).
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
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...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
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...