[PATCH] D120265: AMDGPU: Use the implicit kernargs for code object version 5

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 16:08:17 PDT 2022


arsenm added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16259
+  Value *DP;
+  if ( IsCOV_5) {
+    // Indexing the implicit kernarg segment.
----------------
Extra space after (


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:1839
+    // Pointer address
+    B.materializePtrAdd(LoadAddr, KernargPtrReg, LLT::scalar(64), Offset);
+    // Load address
----------------
Use buildPtrAdd (not sure why we still have materializePtrAdd)


================
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);
----------------
ST is available in the class


================
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,
----------------
Add a COV5 suffix? Probably should also wrap in a namespace


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120265/new/

https://reviews.llvm.org/D120265



More information about the llvm-commits mailing list