|
LLVM 24.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 unsigned | getBankedUnifiedVGPRNum (unsigned NumArchVGPRs, unsigned NumAGPRs) |
Returns the aggregated VGPR pressure for NumArchVGPRs ArchVGPRs and NumAGPRs AGPRs, with AVGPRs already distributed across the banks. | |
| static RegKind | getRegKind (unsigned Reg, const MachineRegisterInfo &MRI) |
Friends | |
| GCNRegPressure | maxPerRegFile (const GCNRegPressure &P1, const GCNRegPressure &P2) |
| Printable | print (const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0) |
Definition at line 33 of file GCNRegPressure.h.
| Enumerator | |
|---|---|
| SGPR | |
| VGPR | |
| AGPR | |
| AVGPR | |
| TOTAL_KINDS | |
Definition at line 34 of file GCNRegPressure.h.
|
inline |
Definition at line 42 of file GCNRegPressure.h.
References clear().
Referenced by less(), maxPerRegFile, operator!=(), operator+=(), operator-=(), operator==(), and print.
|
inline |
Definition at line 50 of file GCNRegPressure.h.
Referenced by GCNRegPressure().
| void GCNRegPressure::dump | ( | ) | const |
Definition at line 948 of file GCNRegPressure.cpp.
References llvm::dbgs(), and print.
|
inline |
Definition at line 46 of file GCNRegPressure.h.
References AGPR, AVGPR, SGPR, and VGPR.
Referenced by llvm::GCNIterativeScheduler::scheduleRegion().
|
inline |
Definition at line 97 of file GCNRegPressure.h.
References AGPR.
Referenced by llvm::GCNRPTarget::getNumRegsBenefit(), getVGPRSpills(), and llvm::GCNRPTarget::isSaveBeneficial().
|
inline |
Definition at line 95 of file GCNRegPressure.h.
Referenced by llvm::GCNRPTarget::getNumRegsBenefit(), getVGPRSpills(), and llvm::GCNRPTarget::isSaveBeneficial().
|
inline |
|
inlinestatic |
Returns the aggregated VGPR pressure for NumArchVGPRs ArchVGPRs and NumAGPRs AGPRs, with AVGPRs already distributed across the banks.
Definition at line 87 of file GCNRegPressure.h.
References getUnifiedVGPRNum().
Referenced by llvm::GCNSchedStage::checkScheduling(), and llvm::GCNSchedStrategy::getRegisterPressures().
|
inline |
ArchLimit, then to the AccVGPR bank up to AccLimit. AVGPRs that fit in neither bank are charged to the ArchVGPR bank so that they show up as excess. Definition at line 106 of file GCNRegPressure.h.
Definition at line 36 of file GCNRegPressure.h.
References assert(), and TOTAL_KINDS.
Referenced by llvm::dumpMaxRegPressure().
Definition at line 52 of file GCNRegPressure.h.
References assert(), and TOTAL_KINDS.
Referenced by llvm::dumpMaxRegPressure().
|
inline |
Definition at line 124 of file GCNRegPressure.h.
References getSGPRNum(), and getVGPRNum().
|
inlinestatic |
Definition at line 194 of file GCNRegPressure.h.
References getRegKind(), MRI, Reg, and TRI.
Referenced by llvm::dumpMaxRegPressure(), llvm::getLiveRegs(), getRegKind(), and inc().
|
inline |
Definition at line 58 of file GCNRegPressure.h.
References SGPR.
Referenced by llvm::GCNRPTarget::getNumRegsBenefit(), getOccupancy(), llvm::GCNSchedStrategy::getRegisterPressures(), llvm::GCNRPTarget::isSaveBeneficial(), less(), and llvm::GCNRPTarget::satisfied().
|
inline |
Definition at line 122 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 75 of file GCNRegPressure.h.
References llvm::alignTo(), and llvm::AMDGPU::IsaInfo::getArchVGPRAllocGranule().
Referenced by getBankedUnifiedVGPRNum(), getVGPRNum(), and llvm::GCNSchedStrategy::initCandidate().
UnifiedVGPRFile Definition at line 61 of file GCNRegPressure.h.
References AGPR, AVGPR, getUnifiedVGPRNum(), and VGPR.
Referenced by getOccupancy(), getVGPRSpills(), less(), and llvm::GCNRPTarget::satisfied().
|
inline |
Definition at line 131 of file GCNRegPressure.h.
References getAGPRNum(), getArchVGPRNum(), llvm::MachineFunction::getSubtarget(), and getVGPRNum().
|
inline |
Definition at line 118 of file GCNRegPressure.h.
References AGPR, AVGPR, TOTAL_KINDS, and VGPR.
Referenced by less().
| void GCNRegPressure::inc | ( | unsigned | Reg, |
| LaneBitmask | PrevMask, | ||
| LaneBitmask | NewMask, | ||
| const MachineRegisterInfo & | MRI ) |
Definition at line 52 of file GCNRegPressure.cpp.
References assert(), llvm::SIRegisterInfo::getNumCoveredRegs(), getRegKind(), MRI, llvm::LaneBitmask::none(), Sign, std::swap(), TOTAL_KINDS, and TRI.
Referenced by llvm::GCNDownwardRPTrackerBase::bumpDownwardPressure(), llvm::dumpMaxRegPressure(), llvm::getRegPressure(), llvm::GCNUpwardRPTracker::recede(), and llvm::GCNDownwardRPTrackerBase::retireDeadUses().
| 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 148 of file GCNRegPressure.cpp.
References GCNRegPressure(), llvm::MachineFunction::getInfo(), getSGPRNum(), getSGPRTuplesWeight(), llvm::MachineFunction::getSubtarget(), getVGPRNum(), getVGPRTuplesWeight(), and I.
|
inline |
Definition at line 176 of file GCNRegPressure.h.
References GCNRegPressure().
|
inline |
Definition at line 180 of file GCNRegPressure.h.
References GCNRegPressure(), I, and RHS.
|
inline |
Definition at line 186 of file GCNRegPressure.h.
References GCNRegPressure(), I, and RHS.
|
inline |
Definition at line 174 of file GCNRegPressure.h.
References GCNRegPressure().
|
friend |
P1 and P2 for each register file. The VGPR and AVGPR components are queried as one sum, so both come from the operand with the larger sum. The AGPR maximum stays separate also for a unified VGPR file: ArchVGPRs and AGPRs use separate ranges of it, so the unified pressure is the sum of both peaks even when they are at different points. Definition at line 222 of file GCNRegPressure.h.
References AVGPR, GCNRegPressure(), I, TOTAL_KINDS, and VGPR.
|
friend |
References GCNRegPressure().
Referenced by dump().