[PATCH] D147143: Add backend support for new PAL ELF Metadata 3.0
David Stuttard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 6 04:21:15 PDT 2023
dstuttard added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:582-602
+ OutStreamer->emitRawComment(" COMPUTE_PGM_RSRC2:SCRATCH_EN: " +
+ Twine(CurrentProgramInfo.ScratchEnable),
+ false);
+ OutStreamer->emitRawComment(" COMPUTE_PGM_RSRC2:USER_SGPR: " +
+ Twine(CurrentProgramInfo.UserSGPR),
+ false);
+ OutStreamer->emitRawComment(" COMPUTE_PGM_RSRC2:TRAP_HANDLER: " +
----------------
arsenm wrote:
> This is a bunch of pure formatting changes that can be pre-committed?
It's not just a formatting change - but point taken. I'll upload something that makes this more obvious (formatting reverts to previous style).
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:1063-1069
+ // The front-end will set tgid_x/y/z_en - just check for consistency
+ assert(MD->checkComputeRegisters(".tgid_x_en",
+ (bool)CurrentProgramInfo.TGIdXEnable));
+ assert(MD->checkComputeRegisters(".tgid_y_en",
+ (bool)CurrentProgramInfo.TGIdYEnable));
+ assert(MD->checkComputeRegisters(".tgid_z_en",
+ (bool)CurrentProgramInfo.TGIdZEnable));
----------------
arsenm wrote:
> Don't understand the assert or the comment. We infer these off, but are you suggesting something else is ignoring that?
For PAL graphics front-ends, the values in the metadata should reflect the information in CurrentProgramInfo - the front end is expected to pass amdgpu-no-workgroup-id-x etc in this situation. Just asserting that this is the case here.
I'll update the comment to make it clearer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147143/new/
https://reviews.llvm.org/D147143
More information about the llvm-commits
mailing list