diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2022-07-22 15:05:57 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2022-07-22 15:05:57 +0100 |
commit | 41da4070a2acd9a9c1a24446d1a670bc70462886 (patch) | |
tree | f201edc13a305d402d51377fdfa7493d92998a6e /gcc | |
parent | 18ef76d3a1701c4dd7ab38ebda5c374b6bc13041 (diff) | |
download | gcc-41da4070a2acd9a9c1a24446d1a670bc70462886.zip gcc-41da4070a2acd9a9c1a24446d1a670bc70462886.tar.gz gcc-41da4070a2acd9a9c1a24446d1a670bc70462886.tar.bz2 |
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/graphds.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/graphds.cc b/gcc/graphds.cc index f4c83e8..91a2ca5 100644 --- a/gcc/graphds.cc +++ b/gcc/graphds.cc @@ -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 |