LLVM 20.0.0git
|
#include "Target/AMDGPU/GCNRegPressure.h"
Public Types | |
enum | RegKind { SGPR32 , SGPR_TUPLE , VGPR32 , VGPR_TUPLE , AGPR32 , AGPR_TUPLE , TOTAL_KINDS } |
Public Member Functions | |
GCNRegPressure () | |
bool | empty () const |
void | clear () |
unsigned | getSGPRNum () const |
unsigned | getVGPRNum (bool UnifiedVGPRFile) const |
unsigned | getArchVGPRNum () const |
unsigned | getAGPRNum () const |
unsigned | getVGPRTuplesWeight () const |
unsigned | getSGPRTuplesWeight () const |
unsigned | getOccupancy (const GCNSubtarget &ST) const |
void | inc (unsigned Reg, LaneBitmask PrevMask, LaneBitmask NewMask, const MachineRegisterInfo &MRI) |
bool | higherOccupancy (const GCNSubtarget &ST, const GCNRegPressure &O) 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 |
Friends | |
GCNRegPressure | max (const GCNRegPressure &P1, const GCNRegPressure &P2) |
Printable | print (const GCNRegPressure &RP, const GCNSubtarget *ST) |
Definition at line 31 of file GCNRegPressure.h.
Enumerator | |
---|---|
SGPR32 | |
SGPR_TUPLE | |
VGPR32 | |
VGPR_TUPLE | |
AGPR32 | |
AGPR_TUPLE | |
TOTAL_KINDS |
Definition at line 32 of file GCNRegPressure.h.
|
inline |
Definition at line 42 of file GCNRegPressure.h.
References clear().
|
inline |
Definition at line 48 of file GCNRegPressure.h.
References TOTAL_KINDS.
Referenced by llvm::GCNRPTracker::clearMaxPressure(), GCNRegPressure(), llvm::GCNDownwardRPTracker::moveMaxPressure(), and llvm::GCNIterativeScheduler::OverrideLegacyStrategy::schedule().
void GCNRegPressure::dump | ( | ) | const |
Definition at line 752 of file GCNRegPressure.cpp.
References llvm::dbgs(), and print.
|
inline |
Definition at line 46 of file GCNRegPressure.h.
References getSGPRNum(), and getVGPRNum().
Referenced by llvm::GCNIterativeScheduler::scheduleRegion().
|
inline |
Definition at line 64 of file GCNRegPressure.h.
References AGPR32.
Referenced by llvm::GCNSchedStage::checkScheduling(), getRegisterPressures(), and less().
|
inline |
Definition at line 62 of file GCNRegPressure.h.
References VGPR32.
Referenced by getRegisterPressures().
|
inline |
Definition at line 70 of file GCNRegPressure.h.
References getSGPRNum(), and getVGPRNum().
Referenced by llvm::GCNSchedStage::checkScheduling(), higherOccupancy(), llvm::GCNSchedStage::revertScheduling(), and llvm::UnclusteredHighRPStage::shouldRevertScheduling().
|
inline |
Definition at line 51 of file GCNRegPressure.h.
References SGPR32.
Referenced by llvm::GCNSchedStage::checkScheduling(), empty(), getOccupancy(), getRegisterPressures(), and less().
|
inline |
Definition at line 68 of file GCNRegPressure.h.
References SGPR_TUPLE.
UnifiedVGPRFile
Definition at line 54 of file GCNRegPressure.h.
References AGPR32, llvm::alignTo(), and VGPR32.
Referenced by llvm::GCNSchedStage::checkScheduling(), empty(), getOccupancy(), less(), and llvm::GCNUpwardRPTracker::reset().
|
inline |
Definition at line 66 of file GCNRegPressure.h.
References AGPR_TUPLE, and VGPR_TUPLE.
|
inline |
Definition at line 80 of file GCNRegPressure.h.
References getOccupancy().
void GCNRegPressure::inc | ( | unsigned | Reg, |
LaneBitmask | PrevMask, | ||
LaneBitmask | NewMask, | ||
const MachineRegisterInfo & | MRI | ||
) |
Definition at line 51 of file GCNRegPressure.cpp.
References AGPR32, AGPR_TUPLE, assert(), llvm::SIRegisterInfo::getNumCoveredRegs(), llvm_unreachable, MRI, llvm::LaneBitmask::none(), SGPR32, SGPR_TUPLE, std::swap(), TRI, VGPR32, and VGPR_TUPLE.
Referenced by llvm::GCNDownwardRPTracker::advanceBeforeNext(), llvm::GCNDownwardRPTracker::advanceToNext(), llvm::GCNDownwardRPTracker::bumpDownwardPressure(), llvm::getRegPressure(), and llvm::GCNUpwardRPTracker::recede().
bool GCNRegPressure::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.
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):
Definition at line 92 of file GCNRegPressure.cpp.
References getAGPRNum(), getSGPRNum(), llvm::MachineFunction::getSubtarget(), and getVGPRNum().
Referenced by llvm::GCNSchedStage::mayCauseSpilling().
|
inline |
Definition at line 103 of file GCNRegPressure.h.
|
inline |
Definition at line 107 of file GCNRegPressure.h.
References I, RHS, and TOTAL_KINDS.
|
inline |
Definition at line 113 of file GCNRegPressure.h.
References I, RHS, and TOTAL_KINDS.
|
inline |
Definition at line 99 of file GCNRegPressure.h.
References TOTAL_KINDS.
|
friend |
Definition at line 132 of file GCNRegPressure.h.
|
friend |
Referenced by dump().