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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 5 12:11:13 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp:79
 
+static bool processImplicitArgUse(CallInst *CI) {
+  Function *F = CI->getParent()->getParent();
----------------
You've repeated most of the body of the existing function when only the core piece of the match differs.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerKernelAttributes.cpp:387-389
+  for (auto *U : ImplicitArgPtr->users()) {
+    CallInst *CI = cast<CallInst>(U);
+    if (HandledImplicitArgUses.insert(CI).second) {
----------------
You're missing a code object version check since these inputs don't exist for < v5


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

https://reviews.llvm.org/D131276



More information about the llvm-commits mailing list