[PATCH] D117485: AMDGPU: Do not optimize out the kernarg segment for clover

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 06:47:05 PST 2022


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

As far as I can tell clover is stuck in the middle of migrating from
using kernel arguments placed before the user kernel arguments, to
moving them after. One field is at the end, and the rest are still at
the beginning. The mesa3d OS disables the segment at the beginning,
but doesn't add them to the end area.

      

Therefore, this is still using implicit arguments placed at the
beginning of the kernarg segment, in addition to the after argument
implicit arg area. We don't track usage of the special intrinsics
loading from the start of the kernarg segment, so stop optimizing
this. Eventually all implicit arguments should be moved to the end of
the buffer.

      

Fixes using a null dereference for llvm.r600.* intrinsics for kernels
with no arguments.


https://reviews.llvm.org/D117485

Files:
  llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/flat-scratch.ll
  llvm/test/CodeGen/AMDGPU/amdgpu.work-item-intrinsics.deprecated.ll
  llvm/test/CodeGen/AMDGPU/flat-scratch.ll
  llvm/test/CodeGen/AMDGPU/spill-sgpr-stack-no-sgpr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117485.400532.patch
Type: text/x-patch
Size: 16105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220117/8409c55c/attachment-0001.bin>


More information about the llvm-commits mailing list