Page MenuHomePhabricator

[AMDGPU] Propagate !noalias and !alias.scope metadata in AMDGPULowerKernelArguments for noalias arguments.
Needs ReviewPublic

Authored by abinavpp on Aug 19 2021, 3:48 AM.



This change requires

This patch handles noalias function arguments of amdgpu_kernel during
llvm.amdgcn.kernarg.segment.ptr() emission by converting them to the equivalent
metadata representation using !noalias and !alias.scope.

Diff Detail

Event Timeline

abinavpp created this revision.Aug 19 2021, 3:48 AM
abinavpp requested review of this revision.Aug 19 2021, 3:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2021, 3:48 AM

What is the purpose of this test ? The kernel input pointers are 'stored to undef', as such those stores see the available noalias scopes, but do not take part in it. Shouldn't the test store something to the pointers instead ?

abinavpp added inline comments.Aug 19 2021, 5:15 AM

I'm not sure about the stores to undefs in AMDGPU/lower-kernargs.ll. This test was added in the initial commit for AMDGPULowerKernelArguments. I assume we're just checking the generated IR for the stores and not worrying about the destination. @arsenm is that right?

Same purpose as D105721?

arsenm added inline comments.Aug 23 2021, 1:06 PM

It's just a dummy use to show the handling of the value

Same purpose as D105721?

Oh! I didn't notice that. @hliao , how should we move forward? Should we abandon this and, or keep and use it for