class scc_iterator
Declaration
template <class GraphT, class GT = GraphTraits<GraphT>>
class scc_iterator { /* full declaration omitted */ };
Description
Enumerate the SCCs of a directed graph in reverse topological order of the SCC DAG. This is implemented using Tarjan's DFS algorithm using an internal stack to build up a vector of nodes in a particular SCC. Note that it is a forward iterator and thus you cannot backtrack or re-visit nodes.
Declared at: llvm/include/llvm/ADT/SCCIterator.h:42
Templates
- GraphT
- GT = GraphTraits<GraphT>
Method Overview
- public void ReplaceNode(llvm::scc_iterator::NodeRef Old, llvm::scc_iterator::NodeRef New)
- public static scc_iterator<GraphT, GT> begin(const GraphT & G)
- public static scc_iterator<GraphT, GT> end(const GraphT &)
- public bool hasLoop() const
- public bool isAtEnd() const
Methods
¶void ReplaceNode(llvm::scc_iterator::NodeRef Old,
llvm::scc_iterator::NodeRef New)
void ReplaceNode(llvm::scc_iterator::NodeRef Old,
llvm::scc_iterator::NodeRef New)
Description
This informs the \c scc_iterator that the specified \c Old node has been deleted, and \c New is to be used in its place.
Declared at: llvm/include/llvm/ADT/SCCIterator.h:135
Parameters
- llvm::scc_iterator::NodeRef Old
- llvm::scc_iterator::NodeRef New
¶static scc_iterator<GraphT, GT> begin(
const GraphT& G)
static scc_iterator<GraphT, GT> begin(
const GraphT& G)
Declared at: llvm/include/llvm/ADT/SCCIterator.h:101
Parameters
- const GraphT& G
¶static scc_iterator<GraphT, GT> end(const GraphT&)
static scc_iterator<GraphT, GT> end(const GraphT&)
Declared at: llvm/include/llvm/ADT/SCCIterator.h:104
Parameters
- const GraphT&
¶bool hasLoop() const
bool hasLoop() const
Description
Test if the current SCC has a loop. If the SCC has more than one node, this is trivially true. If not, it may still contain a loop if the node has an edge back to itself.
Declared at: llvm/include/llvm/ADT/SCCIterator.h:131
¶bool isAtEnd() const
bool isAtEnd() const
Description
Direct loop termination test which is more efficient than comparison with \c end().
Declared at: llvm/include/llvm/ADT/SCCIterator.h:108