This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Do not optimize out the kernarg segment for clover
Needs ReviewPublic

Authored by arsenm on Jan 17 2022, 6:47 AM.

Details

Reviewers
jvesely
Group Reviewers
Restricted Project
Summary

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.

Diff Detail