[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.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 22:55:08 PDT 2016


sanjoy added inline comments.

================
Comment at: lib/Analysis/LazyCallGraph.cpp:827
@@ +826,3 @@
+    Set.insert(&SourceC);
+    auto IsConnected = [&](RefSCC &RC) {
+      for (SCC &C : RC)
----------------
eraman wrote:
> 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? 
> Do you think that would be simpler?

Not in a one-to-one comparison, but perhaps you could write it in a way that can be shared with `ComputeTargetConnectedSet` ?

+ What @eraman said.


https://reviews.llvm.org/D24219





More information about the llvm-commits mailing list