[llvm] [AMDGPU] Skip register uses in AMDGPUResourceUsageAnalysis (PR #133242)

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Mon May 26 05:05:12 PDT 2025


================
@@ -989,7 +989,10 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
   // dispatch registers are function args.
   unsigned WaveDispatchNumSGPR = 0, WaveDispatchNumVGPR = 0;
 
-  if (isShader(F.getCallingConv())) {
+  // Shaders that use the init.whole.wave intrinsic sometimes have VGPR
+  // arguments that are only added for the purpose of preserving their inactive
+  // lanes. Skip including them in the VGPR count.
----------------
rovka wrote:

Yeah, I agree. I'm working on introducing a [new CC](https://github.com/llvm/llvm-project/pull/131334) for functions that need to run with all lanes enabled.

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


More information about the llvm-commits mailing list