LLVM 20.0.0git
|
Classes | |
class | AMDGPUTargetID |
Enumerations | |
enum | { FIXED_NUM_SGPRS_FOR_INIT_BUG = 96 , TRAP_NUM_SGPRS = 16 } |
enum class | TargetIDSetting { Unsupported , Any , Off , On } |
anonymous enum |
Enumerator | |
---|---|
FIXED_NUM_SGPRS_FOR_INIT_BUG | |
TRAP_NUM_SGPRS |
Definition at line 126 of file AMDGPUBaseInfo.h.
|
strong |
Enumerator | |
---|---|
Unsupported | |
Any | |
Off | |
On |
Definition at line 133 of file AMDGPUBaseInfo.h.
unsigned llvm::AMDGPU::IsaInfo::getAddressableLocalMemorySize | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 958 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getFeatureBits(), and llvm::FeatureBitset::test().
Referenced by getLocalMemorySize().
unsigned llvm::AMDGPU::IsaInfo::getAddressableNumArchVGPRs | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1180 of file AMDGPUBaseInfo.cpp.
Referenced by llvm::GCNSubtarget::getAddressableNumArchVGPRs(), and getAddressableNumVGPRs().
unsigned llvm::AMDGPU::IsaInfo::getAddressableNumSGPRs | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1051 of file AMDGPUBaseInfo.cpp.
References FIXED_NUM_SGPRS_FOR_INIT_BUG, llvm::MCSubtargetInfo::getCPU(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::getIsaVersion(), llvm::FeatureBitset::test(), and llvm::Version.
Referenced by llvm::GCNSubtarget::getAddressableNumSGPRs(), getMaxNumSGPRs(), getMinNumSGPRs(), and getSGPRAllocGranule().
unsigned llvm::AMDGPU::IsaInfo::getAddressableNumVGPRs | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1182 of file AMDGPUBaseInfo.cpp.
References getAddressableNumArchVGPRs(), llvm::MCSubtargetInfo::getFeatureBits(), and llvm::FeatureBitset::test().
Referenced by llvm::GCNSubtarget::getAddressableNumVGPRs(), getMaxNumVGPRs(), getMinNumVGPRs(), and llvm::GCNSchedStrategy::initialize().
unsigned llvm::AMDGPU::IsaInfo::getAllocatedNumVGPRBlocks | ( | const MCSubtargetInfo * | STI, |
unsigned | NumVGPRs, | ||
std::optional< bool > | EnableWavefrontSize32 = std::nullopt |
||
) |
STI
when NumVGPRs
are used. Definition at line 1271 of file AMDGPUBaseInfo.cpp.
References getGranulatedNumRegisterBlocks(), and getVGPRAllocGranule().
unsigned llvm::AMDGPU::IsaInfo::getEncodedNumVGPRBlocks | ( | const MCSubtargetInfo * | STI, |
unsigned | NumVGPRs, | ||
std::optional< bool > | EnableWavefrontSize32 = std::nullopt |
||
) |
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 1264 of file AMDGPUBaseInfo.cpp.
References getGranulatedNumRegisterBlocks(), and getVGPREncodingGranule().
unsigned llvm::AMDGPU::IsaInfo::getEUsPerCU | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 968 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::isGFX10Plus(), and llvm::FeatureBitset::test().
Referenced by llvm::GCNSubtarget::GCNSubtarget(), getMaxWorkGroupsPerCU(), and getWavesPerEUForWorkGroup().
|
static |
Definition at line 1128 of file AMDGPUBaseInfo.cpp.
References llvm::divideCeil().
Referenced by getAllocatedNumVGPRBlocks(), getEncodedNumVGPRBlocks(), and getNumSGPRBlocks().
unsigned llvm::AMDGPU::IsaInfo::getLocalMemorySize | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 946 of file AMDGPUBaseInfo.cpp.
References getAddressableLocalMemorySize(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::isGFX10Plus(), and llvm::FeatureBitset::test().
unsigned llvm::AMDGPU::IsaInfo::getMaxFlatWorkGroupSize | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1021 of file AMDGPUBaseInfo.cpp.
Referenced by llvm::GCNSubtarget::getMaxFlatWorkGroupSize(), and llvm::R600Subtarget::getMaxFlatWorkGroupSize().
unsigned llvm::AMDGPU::IsaInfo::getMaxNumSGPRs | ( | const MCSubtargetInfo * | STI, |
unsigned | WavesPerEU, | ||
bool | Addressable | ||
) |
STI
. Definition at line 1080 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().
unsigned llvm::AMDGPU::IsaInfo::getMaxNumVGPRs | ( | const MCSubtargetInfo * | STI, |
unsigned | WavesPerEU | ||
) |
STI
. Definition at line 1255 of file AMDGPUBaseInfo.cpp.
References llvm::alignDown(), assert(), getAddressableNumVGPRs(), getTotalNumVGPRs(), and getVGPRAllocGranule().
Referenced by llvm::GCNSubtarget::getMaxNumVGPRs().
unsigned llvm::AMDGPU::IsaInfo::getMaxWavesPerEU | ( | const MCSubtargetInfo * | STI | ) |
STI
without any kind of limitation. Definition at line 1002 of file AMDGPUBaseInfo.cpp.
References llvm::AMDGPU::hasGFX10_3Insts(), llvm::AMDGPU::isGFX10Plus(), and llvm::AMDGPU::isGFX90A().
Referenced by llvm::AMDGPUMCExpr::createOccupancy(), llvm::GCNSubtarget::GCNSubtarget(), getMaxWorkGroupsPerCU(), getMinNumSGPRs(), getMinNumVGPRs(), and getNumWavesPerEUWithNumVGPRs().
unsigned llvm::AMDGPU::IsaInfo::getMaxWorkGroupsPerCU | ( | const MCSubtargetInfo * | STI, |
unsigned | FlatWorkGroupSize | ||
) |
STI
and limited by given FlatWorkGroupSize
. Definition at line 979 of file AMDGPUBaseInfo.cpp.
References llvm::Triple::amdgcn, assert(), llvm::Triple::getArch(), getEUsPerCU(), llvm::MCSubtargetInfo::getFeatureBits(), getMaxWavesPerEU(), llvm::MCSubtargetInfo::getTargetTriple(), getWavesPerWorkGroup(), llvm::AMDGPU::isGFX10Plus(), N, and llvm::FeatureBitset::test().
Referenced by llvm::GCNSubtarget::getMaxWorkGroupsPerCU(), and llvm::R600Subtarget::getMaxWorkGroupsPerCU().
unsigned llvm::AMDGPU::IsaInfo::getMinFlatWorkGroupSize | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1017 of file AMDGPUBaseInfo.cpp.
Referenced by llvm::GCNSubtarget::getMinFlatWorkGroupSize(), and llvm::R600Subtarget::getMinFlatWorkGroupSize().
unsigned llvm::AMDGPU::IsaInfo::getMinNumSGPRs | ( | const MCSubtargetInfo * | STI, |
unsigned | WavesPerEU | ||
) |
STI
. Definition at line 1063 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().
unsigned llvm::AMDGPU::IsaInfo::getMinNumVGPRs | ( | const MCSubtargetInfo * | STI, |
unsigned | WavesPerEU | ||
) |
STI
. Definition at line 1231 of file AMDGPUBaseInfo.cpp.
References llvm::alignDown(), assert(), getAddressableNumVGPRs(), getMaxWavesPerEU(), getMinNumVGPRs(), getNumWavesPerEUWithNumVGPRs(), getTotalNumVGPRs(), and getVGPRAllocGranule().
Referenced by getMinNumVGPRs(), and llvm::GCNSubtarget::getMinNumVGPRs().
unsigned llvm::AMDGPU::IsaInfo::getMinWavesPerEU | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 998 of file AMDGPUBaseInfo.cpp.
Referenced by llvm::GCNSubtarget::getMinWavesPerEU(), and llvm::R600Subtarget::getMinWavesPerEU().
unsigned llvm::AMDGPU::IsaInfo::getNumExtraSGPRs | ( | const MCSubtargetInfo * | STI, |
bool | VCCUsed, | ||
bool | FlatScrUsed | ||
) |
STI
when the given special registers are used. XNACK is inferred from STI
. Definition at line 1122 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getFeatureBits(), getNumExtraSGPRs(), and llvm::FeatureBitset::test().
unsigned llvm::AMDGPU::IsaInfo::getNumExtraSGPRs | ( | const MCSubtargetInfo * | STI, |
bool | VCCUsed, | ||
bool | FlatScrUsed, | ||
bool | XNACKUsed | ||
) |
STI
when the given special registers are used. Definition at line 1097 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getCPU(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::getIsaVersion(), llvm::FeatureBitset::test(), and llvm::Version.
Referenced by getNumExtraSGPRs().
unsigned llvm::AMDGPU::IsaInfo::getNumSGPRBlocks | ( | const MCSubtargetInfo * | STI, |
unsigned | NumSGPRs | ||
) |
STI
when NumSGPRs
are used. NumSGPRs
should already include any special register counts. Definition at line 1133 of file AMDGPUBaseInfo.cpp.
References getGranulatedNumRegisterBlocks(), and getSGPREncodingGranule().
unsigned llvm::AMDGPU::IsaInfo::getNumWavesPerEUWithNumVGPRs | ( | const MCSubtargetInfo * | STI, |
unsigned | NumVGPRs | ||
) |
NumVGPRs
usage for given subtarget STI
. Definition at line 1188 of file AMDGPUBaseInfo.cpp.
References getMaxWavesPerEU(), getNumWavesPerEUWithNumVGPRs(), getTotalNumVGPRs(), and getVGPRAllocGranule().
Referenced by getMinNumVGPRs(), getNumWavesPerEUWithNumVGPRs(), and llvm::GCNSubtarget::getOccupancyWithNumVGPRs().
unsigned llvm::AMDGPU::IsaInfo::getNumWavesPerEUWithNumVGPRs | ( | unsigned | NumVGPRs, |
unsigned | Granule, | ||
unsigned | MaxWaves, | ||
unsigned | TotalNumVGPRs | ||
) |
NumVGPRs
usage, Granule
size, MaxWaves
possible, and TotalNumVGPRs
available. Definition at line 1195 of file AMDGPUBaseInfo.cpp.
References llvm::alignTo().
unsigned llvm::AMDGPU::IsaInfo::getOccupancyWithNumSGPRs | ( | unsigned | SGPRs, |
unsigned | MaxWaves, | ||
AMDGPUSubtarget::Generation | Gen | ||
) |
SGPRs
usage, MaxWaves
possible, and Gen
. Definition at line 1204 of file AMDGPUBaseInfo.cpp.
References llvm::AMDGPUSubtarget::GFX10, and llvm::AMDGPUSubtarget::VOLCANIC_ISLANDS.
Referenced by llvm::GCNSubtarget::getOccupancyWithNumSGPRs().
unsigned llvm::AMDGPU::IsaInfo::getSGPRAllocGranule | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1031 of file AMDGPUBaseInfo.cpp.
References getAddressableNumSGPRs(), llvm::MCSubtargetInfo::getCPU(), llvm::AMDGPU::getIsaVersion(), and llvm::Version.
Referenced by getMaxNumSGPRs(), getMinNumSGPRs(), and llvm::GCNSubtarget::getSGPRAllocGranule().
unsigned llvm::AMDGPU::IsaInfo::getSGPREncodingGranule | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1040 of file AMDGPUBaseInfo.cpp.
Referenced by llvm::AMDGPUDisassembler::decodeCOMPUTE_PGM_RSRC1(), getNumSGPRBlocks(), and llvm::GCNSubtarget::getSGPREncodingGranule().
|
static |
Definition at line 874 of file AMDGPUBaseInfo.cpp.
References llvm::StringRef::ends_with(), llvm_unreachable, Off, and On.
Referenced by llvm::AMDGPU::IsaInfo::AMDGPUTargetID::setTargetIDFromTargetIDStream().
unsigned llvm::AMDGPU::IsaInfo::getTotalNumSGPRs | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1044 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getCPU(), llvm::AMDGPU::getIsaVersion(), and llvm::Version.
Referenced by getMaxNumSGPRs(), getMinNumSGPRs(), and llvm::GCNSubtarget::getTotalNumSGPRs().
unsigned llvm::AMDGPU::IsaInfo::getTotalNumVGPRs | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 1169 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::isGFX10Plus(), and llvm::FeatureBitset::test().
Referenced by llvm::AMDGPUMCExpr::createOccupancy(), getMaxNumVGPRs(), getMinNumVGPRs(), getNumWavesPerEUWithNumVGPRs(), and llvm::GCNSubtarget::getTotalNumVGPRs().
unsigned llvm::AMDGPU::IsaInfo::getVGPRAllocGranule | ( | const MCSubtargetInfo * | STI, |
std::optional< bool > | EnableWavefrontSize32 = std::nullopt |
||
) |
STI
.For subtargets which support it, EnableWavefrontSize32
should match the ENABLE_WAVEFRONT_SIZE32 kernel descriptor field.
Definition at line 1139 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getFeatureBits(), llvm::AMDGPU::hasGFX10_3Insts(), and llvm::FeatureBitset::test().
Referenced by llvm::AMDGPUMCExpr::createOccupancy(), getAllocatedNumVGPRBlocks(), getMaxNumVGPRs(), getMinNumVGPRs(), getNumWavesPerEUWithNumVGPRs(), llvm::GCNSubtarget::getVGPRAllocGranule(), and llvm::GCNSchedStrategy::initialize().
unsigned llvm::AMDGPU::IsaInfo::getVGPREncodingGranule | ( | const MCSubtargetInfo * | STI, |
std::optional< bool > | EnableWavefrontSize32 = std::nullopt |
||
) |
STI
.For subtargets which support it, EnableWavefrontSize32
should match the ENABLE_WAVEFRONT_SIZE32 kernel descriptor field.
Definition at line 1157 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getFeatureBits(), and llvm::FeatureBitset::test().
Referenced by llvm::AMDGPUDisassembler::decodeCOMPUTE_PGM_RSRC1(), getEncodedNumVGPRBlocks(), and llvm::GCNSubtarget::getVGPREncodingGranule().
unsigned llvm::AMDGPU::IsaInfo::getWavefrontSize | ( | const MCSubtargetInfo * | STI | ) |
STI
. Definition at line 937 of file AMDGPUBaseInfo.cpp.
References llvm::MCSubtargetInfo::getFeatureBits(), and llvm::FeatureBitset::test().
Referenced by getWavesPerWorkGroup().
unsigned llvm::AMDGPU::IsaInfo::getWavesPerEUForWorkGroup | ( | const MCSubtargetInfo * | STI, |
unsigned | FlatWorkGroupSize | ||
) |
FlatWorkGroupSize
. Definition at line 1011 of file AMDGPUBaseInfo.cpp.
References llvm::divideCeil(), getEUsPerCU(), and getWavesPerWorkGroup().
Referenced by llvm::GCNSubtarget::getWavesPerEUForWorkGroup(), and llvm::R600Subtarget::getWavesPerEUForWorkGroup().
unsigned llvm::AMDGPU::IsaInfo::getWavesPerWorkGroup | ( | const MCSubtargetInfo * | STI, |
unsigned | FlatWorkGroupSize | ||
) |
STI
and FlatWorkGroupSize
. Definition at line 1026 of file AMDGPUBaseInfo.cpp.
References llvm::divideCeil(), and getWavefrontSize().
Referenced by getMaxWorkGroupsPerCU(), and getWavesPerEUForWorkGroup().