[llvm] [AMDGPU] Replace dynamic VGPR feature with attribute (PR #133444)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 7 08:29:11 PDT 2025
================
@@ -403,9 +405,13 @@ unsigned GCNSubtarget::getReservedNumSGPRs(const Function &F) const {
std::pair<unsigned, unsigned>
GCNSubtarget::computeOccupancy(const Function &F, unsigned LDSSize,
unsigned NumSGPRs, unsigned NumVGPRs) const {
+ bool IsDynamicVGPR = isDynamicVGPREnabled();
+ if (F.hasFnAttribute("amdgpu-dynamic-vgpr"))
+ IsDynamicVGPR = F.getFnAttribute("amdgpu-dynamic-vgpr").getValueAsBool();
----------------
shiltian wrote:
I think this needs to be consistent in all places thus a helper would be definitely needed.
https://github.com/llvm/llvm-project/pull/133444
More information about the llvm-commits
mailing list