[Openmp-commits] [PATCH] D114270: [openmp][amdgpu][nfc] Simplify implicit args handling

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Nov 19 11:51:18 PST 2021

JonChesterfield added inline comments.

Comment at: openmp/libomptarget/plugins/amdgpu/impl/system.cpp:487-488
-    // add size of implicit args, e.g.: offset x, y and z and pipe pointer, but
-    // do not count the compiler set implicit args, but set your own implicit
-    // args by discounting the compiler set implicit args
+    // TODO: Probably don't want this arithmetic 
     info.kernel_segment_size =
+        (hasHiddenArgs ? kernel_explicit_args_size : kernel_segment_size);
arsenm wrote:
> arsenm wrote:
> > The naming here is going to be confusing. The compiler reported kernarg size is supposed to be the complete allocation size. If this wants to know the explicit argument size, that should probably go to a different named field
> i.e. nothing about checking hasHiddenArgs makes sense
It's less confusing after this patch than it was before. Incremental steps. I'm deleting stuff while I work out how this handling is behaving.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list