LLVM
15.0.0git
|
Enumerate the SCCs of a directed graph in reverse topological order of the SCC DAG. More...
#include "llvm/ADT/SCCIterator.h"
Static Public Member Functions | |
static scc_iterator | begin (const GraphT &G) |
static scc_iterator | end (const GraphT &) |
Additional Inherited Members | |
![]() | |
using | iterator_category = std::forward_iterator_tag |
using | value_type = const std::vector< GraphTraits< GraphT > ::NodeRef > |
using | difference_type = ptrdiff_t |
using | pointer = const std::vector< GraphTraits< GraphT > ::NodeRef > * |
using | reference = const std::vector< GraphTraits< GraphT > ::NodeRef > & |
![]() | |
enum | |
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.
Definition at line 46 of file SCCIterator.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 108 of file SCCIterator.h.
Referenced by llvm::scc_end().
bool llvm::scc_iterator< GraphT, GT >::hasCycle |
Test if the current SCC has a cycle.
If the SCC has more than one node, this is trivially true. If not, it may still contain a cycle if the node has an edge back to itself.
Definition at line 219 of file SCCIterator.h.
|
inline |
Direct loop termination test which is more efficient than comparison with end()
.
Definition at line 112 of file SCCIterator.h.
References assert().
|
inline |
Definition at line 126 of file SCCIterator.h.
References assert().
|
inline |
Definition at line 121 of file SCCIterator.h.
|
inline |
Definition at line 117 of file SCCIterator.h.
References x.
|
inline |
This informs the scc_iterator
that the specified Old
node has been deleted, and New
is to be used in its place.
Definition at line 139 of file SCCIterator.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase().
Referenced by llvm::CallGraphSCC::ReplaceNode().