[PATCH] D120265: AMDGPU: Use the implicit kernargs for code object version 5
Changpeng Fang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 15:06:56 PDT 2022
cfang marked 4 inline comments as done.
cfang added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:1839
+ // Pointer address
+ B.materializePtrAdd(LoadAddr, KernargPtrReg, LLT::scalar(64), Offset);
+ // Load address
----------------
arsenm wrote:
> Use buildPtrAdd (not sure why we still have materializePtrAdd)
Use buildPtrAdd ! Thanks.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:4850
+ MachineFunction &MF = B.getMF();
+ const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>();
+ const LLT S64 = LLT::scalar(64);
----------------
arsenm wrote:
> ST is available in the class
Remove it. Thanks.
================
Comment at: llvm/lib/Target/AMDGPU/SIDefines.h:784
+// Implicit kernel argument offset for code object version 5.
+enum ImplicitKernargOffset : unsigned {
+ HOSTCALL_PTR_OFFSET = 80,
----------------
arsenm wrote:
> Add a COV5 suffix? Probably should also wrap in a namespace
Add COV5 suffix, and wrap in a namespace of ImplicitArg. Rename the type to
Offset. So it is of AMDGPU::ImplicitArg::Offset type.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120265/new/
https://reviews.llvm.org/D120265
More information about the llvm-commits
mailing list