[PATCH] D104997: [AMDGPU] Deduce attributes with the Attributor
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 19 16:19:09 PDT 2021
arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.
LGTM with nit. I still think we should invert these attributes though
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:123
+ if (isDSAddress(C))
+ Result = DS_GLOBAL;
+
----------------
kuter wrote:
> arsenm wrote:
> > I don't know why you are tracking this here. This isn't entirely true anymore, plus there's a dedicated pass for this?
> This is used for the deduction of `amdgpu-queue-ptr` attribute. For non entry entry functions if the function uses a ds global (even transitively) it gets the amdgpuqueue-ptr attribute.
> I tried to replicate what AnnotateKernelFeatures.cpp does since there isn't any documentation available about the attribute(as far as I know).
> How do you think we should proceed ?
Oh right, this is in case we were to insert a trap and using the legacy trap ABI which required the queue ptr. We can now handle some cases of DS instructions in functions without emitting traps, but I guess preserving this for now is fine
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104997/new/
https://reviews.llvm.org/D104997
More information about the llvm-commits
mailing list