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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 3 09:41:49 PDT 2021


jdoerfert added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp:125
+  /// See AbstractAttribute::getName().
+  const std::string getName() const override { return "AAAMDAttributes"; }
+
----------------



================
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);
+      }
----------------
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).


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