[llvm] [AMDGPU] Move stress options into getMaxNumVectorRegs/getBaseMaxNumSGPRs (PR #214762)

Romanov Vlad via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 04:31:44 PDT 2026


================
@@ -630,25 +646,28 @@ unsigned GCNSubtarget::getBaseMaxNumVGPRs(
 }
 
 unsigned GCNSubtarget::getMaxNumVGPRs(const Function &F) const {
+  auto [VGPRs, AGPRs] = getMaxNumVectorRegs(F);
+  // On gfx90a+ VGPRs and AGPRs share a unified register file.
+  // On gfx908 they are independent, so only VGPRs count toward the budget.
+  return hasGFX90AInsts() ? VGPRs + AGPRs : VGPRs;
+}
+
+unsigned GCNSubtarget::getMaxNumVGPRs(const MachineFunction &MF) const {
----------------
romanovvlad wrote:

Do you recommend splitting the patch to two parts: getMaxNumVGPRs refactoring and options move?

https://github.com/llvm/llvm-project/pull/214762


More information about the llvm-commits mailing list