|
LLVM 22.0.0git
|
Enumerate the SCCs of a directed graph in reverse topological order of the SCC DAG. More...
#include "llvm/ADT/SCCIterator.h"
Public Member Functions | |
| bool | isAtEnd () const |
Direct loop termination test which is more efficient than comparison with end(). | |
| bool | operator== (const scc_iterator &x) const |
| scc_iterator & | operator++ () |
| reference | operator* () const |
| bool | hasCycle () const |
| Test if the current SCC has a cycle. | |
| void | ReplaceNode (NodeRef Old, NodeRef New) |
This informs the scc_iterator that the specified Old node has been deleted, and New is to be used in its place. | |
| Public Member Functions inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT > | |
| DerivedT | operator+ (DifferenceTypeT n) const |
| DerivedT | operator- (DifferenceTypeT n) const |
| DerivedT & | operator++ () |
| DerivedT | operator++ (int) |
| DerivedT & | operator-- () |
| DerivedT | operator-- (int) |
| bool | operator!= (const DerivedT &RHS) const |
| bool | operator> (const DerivedT &RHS) const |
| bool | operator<= (const DerivedT &RHS) const |
| bool | operator>= (const DerivedT &RHS) const |
| PointerProxy | operator-> () const |
| ReferenceProxy | operator[] (DifferenceTypeT n) const |
Static Public Member Functions | |
| static scc_iterator | begin (const GraphT &G) |
| static scc_iterator | end (const GraphT &) |
Additional Inherited Members | |
| Public Types inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT > | |
| using | iterator_category = IteratorCategoryT |
| using | value_type = T |
| using | difference_type = DifferenceTypeT |
| using | pointer = PointerT |
| using | reference = ReferenceT |
| Protected Types inherited from llvm::iterator_facade_base< DerivedT, IteratorCategoryT, T, DifferenceTypeT, PointerT, ReferenceT > | |
| enum | { IsRandomAccess , IsBidirectional } |
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 47 of file SCCIterator.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 109 of file SCCIterator.h.
Referenced by llvm::scc_end().
| bool llvm::scc_iterator< GraphT, GT >::hasCycle | ( | ) | const |
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 220 of file SCCIterator.h.
|
inline |
Direct loop termination test which is more efficient than comparison with end().
Definition at line 113 of file SCCIterator.h.
References assert().
Referenced by llvm::dxil::ModuleShaderFlags::initialize(), llvm::CallGraphSCCsPrinterPass::run(), llvm::CFGSCCPrinterPass::run(), and llvm::BranchProbabilityInfo::SccInfo::SccInfo().
|
inline |
Definition at line 127 of file SCCIterator.h.
References assert().
|
inline |
Definition at line 122 of file SCCIterator.h.
|
inline |
Definition at line 118 of file SCCIterator.h.
|
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 140 of file SCCIterator.h.
References assert().
Referenced by llvm::CallGraphSCC::ReplaceNode().