[PATCH] D155884: [AMDGPU] Improve indirect call support in closed modules

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 04:18:29 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:966
+    // and kernel arguments as they are known uniform values.
+    AC.IndirectCalleeSpecializationCallback = [&](Attributor &A,
+                                                  const AbstractAttribute &AA,
----------------
Can you move this to a real function with a name?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:982-984
+      if (auto *Arg = dyn_cast_or_null<Argument>(SimpleV.value()))
+        if (Arg->getParent()->getCallingConv() == CallingConv::AMDGPU_KERNEL)
+          return true;
----------------
AMDGPU::isArgPassedInSGPR. Alternatively we could add some kind of variant of TTI::isAlwaysUniform which covers arguments 


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

https://reviews.llvm.org/D155884



More information about the llvm-commits mailing list