[PATCH] D106402: [Attributor] AAFunctionReachability, Handle CallBase Reachability.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 11 15:22:02 PDT 2021


jdoerfert added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:9349
+      if (Unreachable.count(Fn))
+        return false;
+
----------------
I don't get this. In line 9331 we iterate over unreachable and ask `isReachable` but we always would return false because of this, no?


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:9370
+      for (auto *AAEdges : AAEdgesList) {
+        const SetVector<Function *> Edges = AAEdges->getOptimisticEdges();
+
----------------



================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:9395
+          A.getAAFor<AAFunctionReachability>(AA, IRPosition::function(*Fn),
+                                             DepClassTy::REQUIRED);
+        }
----------------
You can use recordDependence here to make it clear what is happening and avoid some unnecessary code.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:9483
+  QuerySet WholeFunction;
+  DenseMap<CallBase *, QuerySet> CBQueries;
 };
----------------
Documentation for both.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106402



More information about the llvm-commits mailing list