[llvm] [AMDGPU] Add option to preinflate to AVGPR (PR #147413)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 09:48:59 PDT 2025


jrbyrnes wrote:

> A few things:
> 
> * Can this go into AMDGPUPrepareAGPRAlloc instead of GCNPreRAOptimizations?
> * It should only be done if the occupancy target is already down to 1 (i.e. not all AGPRs are reserved)
> * We should just do this by default (i.e. remove the flag or flip the default)

Do you think it makes sense to have it be part of the new scheduling stage ( https://github.com/llvm/llvm-project/pull/149367 ) instead of AMDGPUPrepareAGPRAlloc ? The rationale is that by inflating to AVGPR we can reduce pure VGPR pressure (the RPTracker understands that if VGPR pressure > 256 then we will assign AVGPR to AGPR). Also, at this point, we have an accurate measure of whether or not inflation will help RA.

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


More information about the llvm-commits mailing list