[PATCH] D147143: Add backend support for new PAL ELF Metadata 3.0

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 7 17:08:44 PDT 2023


arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.


================
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));
----------------
dstuttard wrote:
> 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.
Doesn't seem like an appropriate situation for an assert 


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