[PATCH] D24219: [LCG] Redesign the lazy post-order iteration mechanism for the LazyCallGraph to support repeated, stable iterations, even in the face of graph updates.

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 15:19:29 PDT 2016


eraman added inline comments.

================
Comment at: lib/Analysis/LazyCallGraph.cpp:827
@@ +826,3 @@
+    Set.insert(&SourceC);
+    auto IsConnected = [&](RefSCC &RC) {
+      for (SCC &C : RC)
----------------
chandlerc wrote:
> I mean, I could. Do you think that would be simpler? It seems like it would be strictly more complicated than this, and still O(edges), so it didn't seem like it was worth pursuing. But I'm happy to try it out if you think it'd be an improvement.
Isn't what Sanjoy proposing O(|edges in RefSCC DAG|)  which is a tighter bound than O(|edges in the callgraph|) of the current implementation? 

================
Comment at: unittests/Analysis/LazyCallGraphTest.cpp:1082
@@ +1081,3 @@
+
+  // Connect the top to the bottom forming a large RefSCC made up mostly of calls.
+  auto MergedRCs = ARC.insertIncomingRefEdge(D, A);
----------------
Incorrect comment. No calls in this RefSCC.


https://reviews.llvm.org/D24219





More information about the llvm-commits mailing list