[PATCH] D101633: [AMDGPU] Set number vgprs used in PS shaders based on input registers actually used

David Stuttard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 02:19:08 PDT 2021


dstuttard added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:770
+          }
+          PSVGPRCount++;
+        } else {
----------------
dstuttard wrote:
> sebastian-ne wrote:
> > Should this be an increment or a `+= NumRegs`?
> It should be += NumRegs - I've renamed PSVGPRCount to PSArgCount instead
For clarification - I meant, the += NumRegs in the lines above are correct, the ++ on PSArgCount is also correct.
PSArgCount is effectively counting through the bits in InputAddr - each arg can be more than one VGPR hence calculating and adding NumRegs for the NumVGPR counters, but only incrementing the PSArgCount.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101633/new/

https://reviews.llvm.org/D101633



More information about the llvm-commits mailing list