class scc_member_iterator
Declaration
template <class GraphT, class GT = GraphTraits<GraphT>>
class scc_member_iterator { /* full declaration omitted */ };
Description
Sort the nodes of a directed SCC in the decreasing order of the edge weights. The instantiating GraphT type should have weighted edge type 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.
Declared at: llvm/include/llvm/ADT/SCCIterator.h:252
Templates
- GraphT
- GT = GraphTraits<GraphT>
Member Variables
- private std::unordered_map<NodeType*, NodeInfo> NodeInfoMap
- private llvm::scc_member_iterator::NodesType Nodes
Method Overview
- private llvm::scc_member_iterator::NodeInfo * find(llvm::scc_member_iterator::NodeInfo * Node)
- public scc_member_iterator<GraphT, GT>(const llvm::scc_member_iterator::NodesType & InputNodes)
- private bool unionGroups(const llvm::scc_member_iterator::EdgeType * Edge)
Methods
¶llvm::scc_member_iterator::NodeInfo* find(
llvm::scc_member_iterator::NodeInfo* Node)
llvm::scc_member_iterator::NodeInfo* find(
llvm::scc_member_iterator::NodeInfo* Node)
Declared at: llvm/include/llvm/ADT/SCCIterator.h:266
Parameters
¶scc_member_iterator<GraphT, GT>(
const llvm::scc_member_iterator::NodesType&
InputNodes)
scc_member_iterator<GraphT, GT>(
const llvm::scc_member_iterator::NodesType&
InputNodes)
Declared at: llvm/include/llvm/ADT/SCCIterator.h:298
Parameters
- const llvm::scc_member_iterator::NodesType& InputNodes
¶bool unionGroups(
const llvm::scc_member_iterator::EdgeType*
Edge)
bool unionGroups(
const llvm::scc_member_iterator::EdgeType*
Edge)
Declared at: llvm/include/llvm/ADT/SCCIterator.h:274
Parameters
- const llvm::scc_member_iterator::EdgeType* Edge