[PATCH] D134714: [AMDGPU] Make the uses_dynamic_stack field in the kernel descriptor and the metadata map specific to code object v5 and later

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 10 11:54:51 PDT 2022


arsenm added a subscriber: cfang.
arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp:877
       Kern.getDocument()->getNode(ProgramInfo.ScratchSize);
-  Kern[".uses_dynamic_stack"] =
-      Kern.getDocument()->getNode(ProgramInfo.DynamicCallStack);
+  if (AMDGPU::getAmdhsaCodeObjectVersion() >= 5)
+    Kern[".uses_dynamic_stack"] =
----------------
abinavpp wrote:
> arsenm wrote:
> > This isn't querying the module for the code object version; probably should have that in the asm printer doInitialization
> I didn't get you. AMDGPUAsmPrinter's ctor checks for the code-obj-ver using isHsaAbiVersion*, which checks for the AmdhsaCodeObjectVersion like this. Or should we override emitKernel() for MetadataStreamerMsgPackV5 and set this entry there. I don't think I understood the problem that we're trying to fixing by overriding AsmPrinter's doInitialization().
@cfang had a patch to switch to querying the code object version from the IR module instead of the global command line flag


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134714



More information about the llvm-commits mailing list