LLVM: llvm::AMDGPU::IsaInfo Namespace Reference (original) (raw)

Enumerations
enum { FIXED_NUM_SGPRS_FOR_INIT_BUG = 96 , TRAP_NUM_SGPRS = 16 }
enum class TargetIDSetting { Unsupported, Any, Off, On }
Functions
static TargetIDSetting getTargetIDSettingFromFeatureString (StringRef FeatureString)
unsigned getWavefrontSize (const MCSubtargetInfo *STI)
unsigned getLocalMemorySize (const MCSubtargetInfo *STI)
unsigned getAddressableLocalMemorySize (const MCSubtargetInfo *STI)
unsigned getEUsPerCU (const MCSubtargetInfo *STI)
unsigned getMaxWorkGroupsPerCU (const MCSubtargetInfo *STI, unsigned FlatWorkGroupSize)
unsigned getMinWavesPerEU (const MCSubtargetInfo *STI)
unsigned getMaxWavesPerEU (const MCSubtargetInfo *STI)
unsigned getWavesPerEUForWorkGroup (const MCSubtargetInfo *STI, unsigned FlatWorkGroupSize)
unsigned getMinFlatWorkGroupSize (const MCSubtargetInfo *STI)
unsigned getMaxFlatWorkGroupSize (const MCSubtargetInfo *STI)
unsigned getWavesPerWorkGroup (const MCSubtargetInfo *STI, unsigned FlatWorkGroupSize)
unsigned getSGPRAllocGranule (const MCSubtargetInfo *STI)
unsigned getSGPREncodingGranule (const MCSubtargetInfo *STI)
unsigned getTotalNumSGPRs (const MCSubtargetInfo *STI)
unsigned getAddressableNumSGPRs (const MCSubtargetInfo *STI)
unsigned getMinNumSGPRs (const MCSubtargetInfo *STI, unsigned WavesPerEU)
unsigned getMaxNumSGPRs (const MCSubtargetInfo *STI, unsigned WavesPerEU, bool Addressable)
unsigned getNumExtraSGPRs (const MCSubtargetInfo *STI, bool VCCUsed, bool FlatScrUsed, bool XNACKUsed)
unsigned getNumExtraSGPRs (const MCSubtargetInfo *STI, bool VCCUsed, bool FlatScrUsed)
static unsigned getGranulatedNumRegisterBlocks (unsigned NumRegs, unsigned Granule)
unsigned getNumSGPRBlocks (const MCSubtargetInfo *STI, unsigned NumSGPRs)
unsigned getVGPRAllocGranule (const MCSubtargetInfo *STI, unsigned DynamicVGPRBlockSize, std::optional< bool > EnableWavefrontSize32)
unsigned getVGPREncodingGranule (const MCSubtargetInfo *STI, std::optional< bool > EnableWavefrontSize32)
unsigned getArchVGPRAllocGranule ()
For subtargets with a unified VGPR file and mixed ArchVGPR/AGPR usage, returns the allocation granule for ArchVGPRs.
unsigned getTotalNumVGPRs (const MCSubtargetInfo *STI)
unsigned getAddressableNumArchVGPRs (const MCSubtargetInfo *STI)
unsigned getAddressableNumVGPRs (const MCSubtargetInfo *STI, unsigned DynamicVGPRBlockSize)
unsigned getNumWavesPerEUWithNumVGPRs (const MCSubtargetInfo *STI, unsigned NumVGPRs, unsigned DynamicVGPRBlockSize)
unsigned getNumWavesPerEUWithNumVGPRs (unsigned NumVGPRs, unsigned Granule, unsigned MaxWaves, unsigned TotalNumVGPRs)
unsigned getOccupancyWithNumSGPRs (unsigned SGPRs, unsigned MaxWaves, AMDGPUSubtarget::Generation Gen)
unsigned getMinNumVGPRs (const MCSubtargetInfo *STI, unsigned WavesPerEU, unsigned DynamicVGPRBlockSize)
unsigned getMaxNumVGPRs (const MCSubtargetInfo *STI, unsigned WavesPerEU, unsigned DynamicVGPRBlockSize)
unsigned getEncodedNumVGPRBlocks (const MCSubtargetInfo *STI, unsigned NumVGPRs, std::optional< bool > EnableWavefrontSize32)
unsigned getAllocatedNumVGPRBlocks (const MCSubtargetInfo *STI, unsigned NumVGPRs, unsigned DynamicVGPRBlockSize, std::optional< bool > EnableWavefrontSize32)

anonymous enum

Enumerator
FIXED_NUM_SGPRS_FOR_INIT_BUG
TRAP_NUM_SGPRS

Definition at line 143 of file AMDGPUBaseInfo.h.

TargetIDSetting

getAddressableLocalMemorySize()

getAddressableNumArchVGPRs()

getAddressableNumSGPRs()

getAddressableNumVGPRs()

getAllocatedNumVGPRBlocks()

getArchVGPRAllocGranule()

unsigned llvm::AMDGPU::IsaInfo::getArchVGPRAllocGranule ( )

getEncodedNumVGPRBlocks()

Returns

Number of VGPR blocks needed for given subtarget STI when NumVGPRs are used. We actually return the number of blocks -1, since that's what we encode.

For subtargets which support it, EnableWavefrontSize32 should match the ENABLE_WAVEFRONT_SIZE32 kernel descriptor field.

Definition at line 1502 of file AMDGPUBaseInfo.cpp.

References getGranulatedNumRegisterBlocks(), and getVGPREncodingGranule().

getEUsPerCU()

getGranulatedNumRegisterBlocks()

getLocalMemorySize()

getMaxFlatWorkGroupSize()

getMaxNumSGPRs()

Returns

Maximum number of SGPRs that meets the given number of waves per execution unit requirement for given subtarget STI.

Definition at line 1291 of file AMDGPUBaseInfo.cpp.

References llvm::alignDown(), assert(), getAddressableNumSGPRs(), llvm::MCSubtargetInfo::getCPU(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::getIsaVersion(), getSGPRAllocGranule(), getTotalNumSGPRs(), llvm::FeatureBitset::test(), TRAP_NUM_SGPRS, and llvm::Version.

Referenced by llvm::GCNSubtarget::getMaxNumSGPRs().

getMaxNumVGPRs()

getMaxWavesPerEU()

getMaxWorkGroupsPerCU()

Returns

Maximum number of work groups per compute unit for given subtarget STI and limited by given FlatWorkGroupSize.

Definition at line 1196 of file AMDGPUBaseInfo.cpp.

References assert(), getEUsPerCU(), llvm::MCSubtargetInfo::getFeatureBits(), getMaxWavesPerEU(), llvm::MCSubtargetInfo::getTargetTriple(), getWavesPerWorkGroup(), llvm::Triple::isAMDGCN(), llvm::AMDGPU::isGFX10Plus(), N, and llvm::FeatureBitset::test().

Referenced by llvm::GCNSubtarget::getMaxWorkGroupsPerCU(), and llvm::R600Subtarget::getMaxWorkGroupsPerCU().

getMinFlatWorkGroupSize()

getMinNumSGPRs()

Returns

Minimum number of SGPRs that meets the given number of waves per execution unit requirement for given subtarget STI.

Definition at line 1274 of file AMDGPUBaseInfo.cpp.

References llvm::alignDown(), assert(), getAddressableNumSGPRs(), llvm::MCSubtargetInfo::getCPU(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::getIsaVersion(), getMaxWavesPerEU(), getSGPRAllocGranule(), getTotalNumSGPRs(), llvm::FeatureBitset::test(), TRAP_NUM_SGPRS, and llvm::Version.

Referenced by llvm::GCNSubtarget::getMinNumSGPRs().

getMinNumVGPRs()

getMinWavesPerEU()

getNumExtraSGPRs() [1/2]

getNumExtraSGPRs() [2/2]

getNumSGPRBlocks()

getNumWavesPerEUWithNumVGPRs() [1/2]

getNumWavesPerEUWithNumVGPRs() [2/2]

Returns

Number of waves reachable for a given NumVGPRs usage, Granule size, MaxWaves possible, and TotalNumVGPRs available.

Definition at line 1427 of file AMDGPUBaseInfo.cpp.

References llvm::alignTo().

getOccupancyWithNumSGPRs()

getSGPRAllocGranule()

getSGPREncodingGranule()

getTargetIDSettingFromFeatureString()

TargetIDSetting llvm::AMDGPU::IsaInfo::getTargetIDSettingFromFeatureString ( StringRef FeatureString) static

getTotalNumSGPRs()

getTotalNumVGPRs()

getVGPRAllocGranule()

Returns

VGPR allocation granularity for given subtarget STI.

For subtargets which support it, EnableWavefrontSize32 should match the ENABLE_WAVEFRONT_SIZE32 kernel descriptor field.

Definition at line 1350 of file AMDGPUBaseInfo.cpp.

References llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::hasGFX10_3Insts(), and llvm::FeatureBitset::test().

Referenced by createOccupancy(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), getAddressableNumVGPRs(), getAllocatedNumVGPRBlocks(), getMaxNumVGPRs(), getMinNumVGPRs(), getNumWavesPerEUWithNumVGPRs(), llvm::GCNSubtarget::getVGPRAllocGranule(), and llvm::GCNSchedStrategy::initialize().

getVGPREncodingGranule()

getWavefrontSize()

getWavesPerEUForWorkGroup()

getWavesPerWorkGroup()