[PATCH] D112716: AMDGPU: Account for implicit argument alignment for kernarg segment

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 06:28:47 PDT 2021


arsenm created this revision.
arsenm added reviewers: rampitec, t-tye, kzhuravl.
Herald added subscribers: foad, kerbowa, hiraditya, tpr, dstuttard, yaxunl, nhaehnle, jvesely.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

If a kernel had no formal arguments but did have the implicit
arguments, we were reporting a required kernarg alignment of 4. For
some reason we require an 8-byte alignment for this, even though
there's no real advantage and I don't see where this is documented in
the ABI.

      

The code object header code also claims the minimum alignment is 16,
which is what I thought you always got at runtime anyway so I don't
know why this matters.


https://reviews.llvm.org/D112716

Files:
  llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
  llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.implicitarg.ptr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112716.383020.patch
Type: text/x-patch
Size: 4431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211028/f4f25b8d/attachment.bin>


More information about the llvm-commits mailing list