[llvm] 16a2c4e - [NFC][scciter] Update code comments.
Hongtao Yu via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 16:05:42 PDT 2023
Author: Hongtao Yu
Date: 2023-03-27T16:05:32-07:00
New Revision: 16a2c4e9cd508a7947a61069c97b588b374b88fa
URL: https://github.com/llvm/llvm-project/commit/16a2c4e9cd508a7947a61069c97b588b374b88fa
DIFF: https://github.com/llvm/llvm-project/commit/16a2c4e9cd508a7947a61069c97b588b374b88fa.diff
LOG: [NFC][scciter] Update code comments.
Added:
Modified:
llvm/include/llvm/ADT/SCCIterator.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/SCCIterator.h b/llvm/include/llvm/ADT/SCCIterator.h
index 267139d90eeaf..e743ae7c11edb 100644
--- a/llvm/include/llvm/ADT/SCCIterator.h
+++ b/llvm/include/llvm/ADT/SCCIterator.h
@@ -244,11 +244,11 @@ template <class T> scc_iterator<T> scc_end(const T &G) {
/// declared in its graph traits in order to use this iterator.
///
/// This is implemented using Kruskal's minimal spanning tree algorithm followed
-/// by a BFS walk. First a maximum spanning tree (forest) is built based on all
-/// edges within the SCC collection. Then a BFS walk is initiated on tree nodes
-/// that do not have a predecessor. Finally, the BFS order computed is the
-/// traversal order of the nodes of the SCC. Such order ensures that
-/// high-weighted edges are visited first during the tranversal.
+/// by Kahn's algorithm to compute a topological order on the MST. First a
+/// maximum spanning tree (forest) is built based on all edges within the SCC
+/// collection. Then a topological walk is initiated on tree nodes that do not
+/// have a predecessor and then applied to all nodes of the SCC. Such order
+/// ensures that high-weighted edges are visited first during the traversal.
template <class GraphT, class GT = GraphTraits<GraphT>>
class scc_member_iterator {
using NodeType = typename GT::NodeType;
More information about the llvm-commits
mailing list