[llvm] [AMDGPU] Adds AGPR pressure during candidate init in GCN scheduler. (PR #185733)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 01:41:07 PDT 2026


================
@@ -1528,6 +1533,25 @@ unsigned getMaxNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU,
   return std::min(MaxNumVGPRs, AddressableNumVGPRs);
 }
 
+unsigned getMaxNumAGPRs(const MCSubtargetInfo *STI, unsigned int WavesPerEU) {
----------------
cdevadas wrote:

The function `GCNSubtarget::getMaxNumVectorRegs` already computes the combined VGPR and AGPR register budget and I guess it consolidates all necessary logic. Would it serve your purpose (the scheduler needs the budget for both VGPRs and AGPRs)? Adding separate helper functions for the same purpose could confuse developers when they look for a similar function, and it may lead to incomplete calculations if any logic is missed.

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


More information about the llvm-commits mailing list