|
LLVM 22.0.0git
|
#include "Target/AMDGPU/GCNRegPressure.h"
Public Types | |
| enum | RegKind { SGPR , VGPR , AGPR , AVGPR , TOTAL_KINDS } |
Static Public Member Functions | |
| static constexpr const char * | getName (RegKind Kind) |
| static unsigned | getUnifiedVGPRNum (unsigned NumArchVGPRs, unsigned NumAGPRs, unsigned NumAVGPRs) |
Returns the aggregated VGPR pressure, assuming NumArchVGPRs ArchVGPRs NumAGPRs AGPRS, and NumAVGPRs AVGPRs for a target with a unified VGPR file. | |
| static RegKind | getRegKind (unsigned Reg, const MachineRegisterInfo &MRI) |
Friends | |
| GCNRegPressure | max (const GCNRegPressure &P1, const GCNRegPressure &P2) |
| Printable | print (const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0) |
Definition at line 32 of file GCNRegPressure.h.
| Enumerator | |
|---|---|
| SGPR | |
| VGPR | |
| AGPR | |
| AVGPR | |
| TOTAL_KINDS | |
Definition at line 33 of file GCNRegPressure.h.
|
inline |
Definition at line 41 of file GCNRegPressure.h.
References clear().
Referenced by higherOccupancy(), less(), max, operator!=(), operator+=(), operator-=(), operator==(), and print.
|
inline |
Definition at line 49 of file GCNRegPressure.h.
Referenced by GCNRegPressure().
| void GCNRegPressure::dump | ( | ) | const |
Definition at line 834 of file GCNRegPressure.cpp.
References llvm::dbgs(), and print.
|
inline |
Definition at line 45 of file GCNRegPressure.h.
References AGPR, AVGPR, SGPR, and VGPR.
Referenced by llvm::GCNIterativeScheduler::scheduleRegion().
|
inline |
Definition at line 88 of file GCNRegPressure.h.
References AGPR.
Referenced by getRegisterPressures(), and less().
|
inline |
Definition at line 86 of file GCNRegPressure.h.
Referenced by getRegisterPressures().
|
inline |
Definition at line 35 of file GCNRegPressure.h.
References assert(), and TOTAL_KINDS.
Referenced by llvm::dumpMaxRegPressure().
Definition at line 51 of file GCNRegPressure.h.
References assert(), and TOTAL_KINDS.
Referenced by llvm::dumpMaxRegPressure().
|
inline |
Definition at line 98 of file GCNRegPressure.h.
References getSGPRNum(), and getVGPRNum().
Referenced by higherOccupancy().
|
inlinestatic |
Definition at line 151 of file GCNRegPressure.h.
References getRegKind(), MRI, Reg, and TRI.
Referenced by llvm::dumpMaxRegPressure(), llvm::getLiveRegs(), getRegKind(), and inc().
|
inline |
Definition at line 57 of file GCNRegPressure.h.
References SGPR.
Referenced by getOccupancy(), getRegisterPressures(), and less().
|
inline |
Definition at line 96 of file GCNRegPressure.h.
References SGPR, and TOTAL_KINDS.
Referenced by less().
|
inlinestatic |
Returns the aggregated VGPR pressure, assuming NumArchVGPRs ArchVGPRs NumAGPRs AGPRS, and NumAVGPRs AVGPRs for a target with a unified VGPR file.
Definition at line 74 of file GCNRegPressure.h.
References llvm::alignTo(), and llvm::AMDGPU::IsaInfo::getArchVGPRAllocGranule().
Referenced by getVGPRNum().
UnifiedVGPRFile Definition at line 60 of file GCNRegPressure.h.
References AGPR, AVGPR, getUnifiedVGPRNum(), and VGPR.
Referenced by getOccupancy(), and less().
|
inline |
Definition at line 92 of file GCNRegPressure.h.
References AGPR, AVGPR, TOTAL_KINDS, and VGPR.
Referenced by less().
|
inline |
Definition at line 110 of file GCNRegPressure.h.
References GCNRegPressure(), and getOccupancy().
| void GCNRegPressure::inc | ( | unsigned | Reg, |
| LaneBitmask | PrevMask, | ||
| LaneBitmask | NewMask, | ||
| const MachineRegisterInfo & | MRI ) |
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().
| 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 100 of file GCNRegPressure.cpp.
References GCNRegPressure(), getAGPRNum(), llvm::MachineFunction::getInfo(), getSGPRNum(), getSGPRTuplesWeight(), llvm::MachineFunction::getSubtarget(), getVGPRNum(), getVGPRTuplesWeight(), and I.
|
inline |
Definition at line 133 of file GCNRegPressure.h.
References GCNRegPressure().
|
inline |
Definition at line 137 of file GCNRegPressure.h.
References GCNRegPressure(), I, and RHS.
|
inline |
Definition at line 143 of file GCNRegPressure.h.
References GCNRegPressure(), I, and RHS.
|
inline |
Definition at line 131 of file GCNRegPressure.h.
References GCNRegPressure().
|
friend |
Definition at line 174 of file GCNRegPressure.h.
References GCNRegPressure(), and I.
|
friend |
References GCNRegPressure().
Referenced by dump().