[PATCH] D74691: [Attributor] Detect possibly unbounded cycles in functions

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 09:12:28 PDT 2020


uenoku added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2429
+  // unbounded cycle.
+  // We use scc_iterator which uses Tarjan algorithm to find all the maximal
+  // SCCs. Those are SCCs which are as big as they can get. i.e. in which you
----------------
baziotis wrote:
> uenoku wrote:
> > nit: Normally, the word "strongly connected components" contains its maximality. So I think it's more concise to omit the description for maximality.
> I'm not sure there's a definitive answer here. It depends on the definition. If we use the "reachability" definition, then it's not implied. An SCC can contain an SCC. But if we talk about plural, i.e. SCCs of a graph, the definition contains the term partition. Which implies maximality. I've seen both in books and I believe it's a long discussion in which we don't want to get the reader to. The fact that I didn't remember that `scc_iterators` finds maximal SCCs led to 3-4 days at least of working on a wrong solution (in this patch actually).
Ok, I'm fine with either way :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74691





More information about the llvm-commits mailing list