[PATCH] D105116: [AMDGPU] Set optional PAL metadata

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 06:59:42 PDT 2021


sebastian-ne added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:1406
+  MD->setFunctionLdsSize(MF, CurrentProgramInfo.LDSSize);
+  MD->setFunctionNumUsedVgprs(MF, CurrentProgramInfo.NumVGPRsForWavesPerEU);
+  MD->setFunctionNumUsedSgprs(MF, CurrentProgramInfo.NumSGPRsForWavesPerEU);
----------------
foad wrote:
> Is this the number of vgprs that are actually used by the generated ISA? >From the name "NumVGPRsForWavesPerEU" it sounds like it might be the maximum number that //could// be used while still achieving some specified occupancy.
I’m not sure either by looking at the name.
But it seems to be the number of used registers, at least in the test case.
Also, this variable is used to set the normal `.vgpr_count` too (with normal, I mean the `.vgpr_count` that we already set, in contrast to the one in `.shader_functions`, which is added here).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105116



More information about the llvm-commits mailing list