[PATCH] D131276: AMDGPU: Implicit kernel arguments related optimization when uniform-workgroup-size=true

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 17:12:47 PDT 2022


cfang marked 2 inline comments as done.
cfang added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp:320
+
+    if (!ImplicitArgPtr) // ImplicitArf ptr not used.
+      return false;
----------------
arsenm wrote:
> Typo ImplicitArf
Thanks.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp:323-330
+    SmallPtrSet<Instruction *, 4> HandledImplicitArgUses;
+    for (auto *U : ImplicitArgPtr->users()) {
+      CallInst *CI = cast<CallInst>(U);
+      if (HandledImplicitArgUses.insert(CI).second) {
+        if (processUse(CI, true))
+          MadeChange = true;
+      }
----------------
arsenm wrote:
> These can reuse the same set and user loop
Done. Thanks for the suggestions. 


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

https://reviews.llvm.org/D131276



More information about the llvm-commits mailing list