LLVM: llvm::GCNRegPressure Struct Reference (original) (raw)

#include "[Target/AMDGPU/GCNRegPressure.h](GCNRegPressure%5F8h%5Fsource.html)"

Public Types
enum RegKind { SGPR, VGPR, AGPR, AVGPR, TOTAL_KINDS }
Public Member Functions
GCNRegPressure ()
bool empty () const
void clear ()
unsigned getNumRegs (RegKind Kind) const
unsigned getSGPRNum () const
unsigned getVGPRNum (bool UnifiedVGPRFile) const
unsigned getArchVGPRNum () const
unsigned getAGPRNum () const
unsigned getAVGPRNum () const
unsigned getVGPRTuplesWeight () const
unsigned getSGPRTuplesWeight () const
unsigned getOccupancy (const GCNSubtarget &ST, unsigned DynamicVGPRBlockSize) const
void inc (unsigned Reg, LaneBitmask PrevMask, LaneBitmask NewMask, const MachineRegisterInfo &MRI)
bool higherOccupancy (const GCNSubtarget &ST, const GCNRegPressure &O, unsigned DynamicVGPRBlockSize) const
bool less (const MachineFunction &MF, const GCNRegPressure &O, unsigned MaxOccupancy=std::numeric_limits< unsigned >::max()) const
Compares this GCNRegpressure to O, returning true if this is less.
bool operator== (const GCNRegPressure &O) const
bool operator!= (const GCNRegPressure &O) const
GCNRegPressure & operator+= (const GCNRegPressure &RHS)
GCNRegPressure & operator-= (const GCNRegPressure &RHS)
void dump () const

Definition at line 32 of file GCNRegPressure.h.

RegKind

Enumerator
SGPR
VGPR
AGPR
AVGPR
TOTAL_KINDS

Definition at line 33 of file GCNRegPressure.h.

llvm::GCNRegPressure::GCNRegPressure ( ) inline

clear()

void llvm::GCNRegPressure::clear ( ) inline

dump()

void GCNRegPressure::dump ( ) const

empty()

bool llvm::GCNRegPressure::empty ( ) const inline

getAGPRNum()

unsigned llvm::GCNRegPressure::getAGPRNum ( ) const inline

getArchVGPRNum()

unsigned llvm::GCNRegPressure::getArchVGPRNum ( ) const inline

getAVGPRNum()

unsigned llvm::GCNRegPressure::getAVGPRNum ( ) const inline

getName()

constexpr const char * llvm::GCNRegPressure::getName ( RegKind Kind) inlinestaticconstexpr

getNumRegs()

unsigned llvm::GCNRegPressure::getNumRegs ( RegKind Kind) const inline

getOccupancy()

getRegKind()

getSGPRNum()

unsigned llvm::GCNRegPressure::getSGPRNum ( ) const inline

getSGPRTuplesWeight()

unsigned llvm::GCNRegPressure::getSGPRTuplesWeight ( ) const inline

getUnifiedVGPRNum()

getVGPRNum()

unsigned llvm::GCNRegPressure::getVGPRNum ( bool UnifiedVGPRFile) const inline

getVGPRTuplesWeight()

unsigned llvm::GCNRegPressure::getVGPRTuplesWeight ( ) const inline

higherOccupancy()

inc()

Definition at line 49 of file GCNRegPressure.cpp.

References assert(), llvm::SIRegisterInfo::getNumCoveredRegs(), getRegKind(), MRI, llvm::LaneBitmask::none(), std::swap(), TOTAL_KINDS, and TRI.

Referenced by llvm::GCNDownwardRPTracker::bumpDownwardPressure(), llvm::dumpMaxRegPressure(), llvm::getRegPressure(), and llvm::GCNUpwardRPTracker::recede().

less()

Compares this GCNRegpressure to O, returning true if this is less.

Since GCNRegpressure contains different types of pressures, and due to target-specific pecularities (e.g. we care about occupancy rather than raw register usage), we determine if this GCNRegPressure is less than O based on the following tiered comparisons (in order order of precedence):

  1. Better occupancy
  2. Less spilling (first preference to VGPR spills, then to SGPR spills)
  3. Less tuple register pressure (first preference to VGPR tuples if we determine that SGPR pressure is not important)
  4. Less raw register pressure (first preference to VGPR tuples if we determine that SGPR pressure is not important)

Definition at line 100 of file GCNRegPressure.cpp.

References GCNRegPressure(), getAGPRNum(), llvm::MachineFunction::getInfo(), getSGPRNum(), getSGPRTuplesWeight(), llvm::MachineFunction::getSubtarget(), getVGPRNum(), getVGPRTuplesWeight(), and I.

operator!=()

operator+=()

operator-=()

operator==()

max

print


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