[PATCH] D104997: [WIP][AMDGPU] Deduce attributes with the Attributor

Kuter Dinel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 3 14:05:00 PDT 2021


kuter marked an inline comment as done.
kuter added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:275-282
+    // If this function hasAddressTaken() = true
+    // then add all attributes corresponding to the implicit args.
+    if (CallingConvSupportsAllImplicits &&
+        F->hasAddressTaken(nullptr, true, true, true)) {
+      for (StringRef AttrName : ImplicitAttrNames) {
+        Attributes.insert(AttrName);
+      }
----------------
jdoerfert wrote:
> don't do this. Use the regular, checkforallcallsites mechanism instead. It will detect non-call site uses just fine but also allow callbacks and implicit calls (soon).
The flow of the deduction here is  callee -> caller. I don't really understand why this needs to be done in the first place.
I just assumed that there is a special reason why this is needed `simple-indirect-call.ll` explicitly checks for this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104997



More information about the llvm-commits mailing list