]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
graphds: Fix description of SCC algorithm
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 22 Jul 2022 14:05:57 +0000 (15:05 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Fri, 22 Jul 2022 14:05:57 +0000 (15:05 +0100)
graphds_scc says that it uses Tarjan's algorithm, but it looks like
it uses Kosaraju's algorithm instead (dfs one way followed by dfs
the other way).

gcc/
* graphds.cc (graphds_scc): Fix algorithm attribution.

gcc/graphds.cc

index f4c83e81cf95d055a64657ee008a5c53e52695b7..91a2ca5c225b748def0df2f448a639457d2a7c27 100644 (file)
@@ -276,7 +276,7 @@ graphds_dfs (struct graph *g, int *qs, int nq, vec<int> *qt,
 }
 
 /* Determines the strongly connected components of G, using the algorithm of
-   Tarjan -- first determine the postorder dfs numbering in reversed graph,
+   Kosaraju -- first determine the postorder dfs numbering in reversed graph,
    then run the dfs on the original graph in the order given by decreasing
    numbers assigned by the previous pass.  If SUBGRAPH is not NULL, it
    specifies the subgraph of G whose strongly connected components we want