From: Richard Sandiford Date: Fri, 22 Jul 2022 14:05:57 +0000 (+0100) Subject: graphds: Fix description of SCC algorithm X-Git-Tag: basepoints/gcc-14~5408 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41da4070a2acd9a9c1a24446d1a670bc70462886;p=thirdparty%2Fgcc.git graphds: Fix description of SCC algorithm 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. --- diff --git a/gcc/graphds.cc b/gcc/graphds.cc index f4c83e81cf9..91a2ca5c225 100644 --- a/gcc/graphds.cc +++ b/gcc/graphds.cc @@ -276,7 +276,7 @@ graphds_dfs (struct graph *g, int *qs, int nq, vec *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