[PATCH] D120265: AMDGPU: Use the implicit kernargs for code object version 5
Sameer Sahasrabuddhe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 22:54:39 PST 2022
sameerds added a comment.
Please remove the JIRA ticket number from the commit description.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:4876
+ Register LoadAddr;
+ B.materializePtrAdd(LoadAddr, KernargPtrReg, LLT::scalar(64), Offset);
+ // Load address
----------------
cfang wrote:
> arsenm wrote:
> > You're repeating this long sequence to get the queue pointer in two places, should common these into a function to get the queue pointer. Alternatively, emit the intrinsic and move this expansion into a lowering of the queue pointer intrinsic
> We are loading different implicit kernel arguments in these two place, one is for queue_ptr, and another is for private_base/shared_base. I can try to figure out whether we can factor out some common part.
There is still a lot common between this hunk and the previous hunk. It should be refactored into a common function.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120265/new/
https://reviews.llvm.org/D120265
More information about the llvm-commits
mailing list