[clang] [llvm] [AMDGPU] Add initial support for VGPR as memory (PR #205435)
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 3 05:33:36 PDT 2026
================
@@ -176,12 +176,24 @@ AMDGPUResourceUsageAnalysisImpl::analyzeResourceUsage(
Info.NumAGPR = TRI.getNumUsedPhysRegs(MRI, AMDGPU::AGPR_32RegClass,
/*IncludeCalls=*/false);
+ // Reserved "VGPR as memory" file registers aren't "used" but must still be
+ // allocated, so the VGPR count has to cover the highest one.
----------------
rovka wrote:
Do we really need to? If they're used anywhere in the callgraph the usage will be propagated, and if they're not really used, why allocate them? (Does TRI exclude reserved registers or something?)
https://github.com/llvm/llvm-project/pull/205435
More information about the llvm-commits
mailing list