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 30 of file GCNRegPressure.h.
Enumerator | |
---|---|
SGPR32 | |
SGPR_TUPLE | |
VGPR32 | |
VGPR_TUPLE | |
AGPR32 | |
AGPR_TUPLE | |
TOTAL_KINDS |
Definition at line 31 of file GCNRegPressure.h.
|
inline |
Definition at line 41 of file GCNRegPressure.h.
References clear().
|
inline |
Definition at line 47 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 588 of file GCNRegPressure.cpp.
References llvm::dbgs(), and print.
|
inline |
Definition at line 45 of file GCNRegPressure.h.
References getSGPRNum(), and getVGPRNum().
Referenced by llvm::GCNIterativeScheduler::scheduleRegion().
|
inline |
Definition at line 63 of file GCNRegPressure.h.
References AGPR32.
Referenced by llvm::GCNSchedStage::checkScheduling(), and less().
|
inline |
|
inline |
Definition at line 69 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 50 of file GCNRegPressure.h.
References SGPR32.
Referenced by llvm::GCNSchedStage::checkScheduling(), empty(), getOccupancy(), and less().
|
inline |
UnifiedVGPRFile
Definition at line 53 of file GCNRegPressure.h.
References AGPR32, llvm::alignTo(), and VGPR32.
Referenced by llvm::GCNSchedStage::checkScheduling(), empty(), getOccupancy(), and less().
|
inline |
Definition at line 65 of file GCNRegPressure.h.
References AGPR_TUPLE, and VGPR_TUPLE.
Referenced by less().
|
inline |
Definition at line 79 of file GCNRegPressure.h.
References getOccupancy().
void GCNRegPressure::inc | ( | unsigned | Reg, |
LaneBitmask | PrevMask, | ||
LaneBitmask | NewMask, | ||
const MachineRegisterInfo & | MRI | ||
) |
Definition at line 50 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::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 91 of file GCNRegPressure.cpp.
References getAGPRNum(), getSGPRNum(), getSGPRTuplesWeight(), llvm::MachineFunction::getSubtarget(), getVGPRNum(), getVGPRTuplesWeight(), and I.
Referenced by llvm::GCNSchedStage::mayCauseSpilling().
|
inline |
Definition at line 102 of file GCNRegPressure.h.
|
inline |
Definition at line 106 of file GCNRegPressure.h.
References I, RHS, and TOTAL_KINDS.
|
inline |
Definition at line 112 of file GCNRegPressure.h.
References I, RHS, and TOTAL_KINDS.
|
inline |
Definition at line 98 of file GCNRegPressure.h.
References TOTAL_KINDS.
|
friend |
Definition at line 131 of file GCNRegPressure.h.
|
friend |
Referenced by dump().