LLVM API Documentation

Classes | Public Member Functions | Protected Member Functions
llvm::RegisterClassInfo Class Reference

#include <RegisterClassInfo.h>

List of all members.

Classes

struct  RCInfo

Public Member Functions

 RegisterClassInfo ()
void runOnMachineFunction (const MachineFunction &MF)
unsigned getNumAllocatableRegs (const TargetRegisterClass *RC) const
ArrayRef< MCPhysReggetOrder (const TargetRegisterClass *RC) const
bool isProperSubClass (const TargetRegisterClass *RC) const
unsigned getLastCalleeSavedAlias (unsigned PhysReg) const
unsigned getMinCost (const TargetRegisterClass *RC)
unsigned getLastCostChange (const TargetRegisterClass *RC)
unsigned getRegPressureSetLimit (unsigned Idx) const

Protected Member Functions

unsigned computePSetLimit (unsigned Idx) const

Detailed Description

Definition at line 26 of file RegisterClassInfo.h.


Constructor & Destructor Documentation

Definition at line 33 of file RegisterClassInfo.cpp.


Member Function Documentation

This is not accurate because two overlapping register sets may have some nonoverlapping reserved registers. However, computing the allocation order for all register classes would be too expensive.

Definition at line 154 of file RegisterClassInfo.cpp.

References getNumAllocatableRegs(), llvm::TargetRegisterClass::getNumRegs(), llvm::TargetRegisterInfo::getRegClassPressureSets(), llvm::TargetRegisterInfo::getRegClassWeight(), llvm::TargetRegisterInfo::getRegPressureSetLimit(), if(), llvm::TargetRegisterInfo::regclass_begin(), llvm::TargetRegisterInfo::regclass_end(), llvm::RegClassWeight::RegWeight, and llvm::RegClassWeight::WeightLimit.

Referenced by getRegPressureSetLimit().

getLastCalleeSavedAlias - Returns the last callee saved register that overlaps PhysReg, or 0 if Reg doesn't overlap a CSR.

Definition at line 109 of file RegisterClassInfo.h.

References llvm::TargetRegisterInfo::isPhysicalRegister(), and N.

Get the position of the last cost change in getOrder(RC).

All registers in getOrder(RC).slice(getLastCostChange(RC)) will have the same cost according to TRI->getCostPerUse().

Definition at line 127 of file RegisterClassInfo.h.

Get the minimum register cost in RC's allocation order. This is the smallest value returned by TRI->getCostPerUse(Reg) for all the registers in getOrder(RC).

Definition at line 119 of file RegisterClassInfo.h.

getNumAllocatableRegs - Returns the number of actually allocatable registers in RC in the current function.

Definition at line 86 of file RegisterClassInfo.h.

Referenced by computePSetLimit(), getNumAllocatableRegsForConstraints(), and llvm::GenericScheduler::initPolicy().

getOrder - Returns the preferred allocation order for RC. The order contains no reserved registers, and registers that alias callee saved registers come last.

Definition at line 93 of file RegisterClassInfo.h.

Referenced by llvm::RegAllocBase::allocatePhysRegs(), and llvm::AllocationOrder::AllocationOrder().

Get the register unit limit for the given pressure set index.

RegisterClassInfo adjusts this limit for reserved registers.

Definition at line 134 of file RegisterClassInfo.h.

References computePSetLimit().

Referenced by computeExcessPressureDelta(), llvm::RegPressureTracker::getUpwardPressureDelta(), llvm::ScheduleDAGMILive::initRegPressure(), and llvm::ScheduleDAGMILive::updateScheduledPressure().

isProperSubClass - Returns true if RC has a legal super-class with more allocatable registers.

Register classes like GR32_NOSP are not proper sub-classes because esp is not allocatable. Similarly, tGPR is not a proper sub-class in Thumb mode because the GPR super-class is not legal.

Definition at line 103 of file RegisterClassInfo.h.


The documentation for this class was generated from the following files: