CRTP base for a single post‐order graph walk.
Synopsis
Declared in <llvm/ADT/PostOrderIterator.h>
template<
typename DerivedT,
typename GraphTraits>
class PostOrderTraversalBase;
Description
Subclasses provide visited storage via insertEdge(). Call init() with the start node before iterating. finishPostorder() observes each node just before the iterator advances; insertEdge() can skip unwanted nodes by returning false.
Types
Name |
Description |
Input iterator yielding nodes in post‐order during a single traversal. |
Member Functions
Name |
Description |
Iterator to the current post‐order node, or end if none remain. |
|
Past‐the‐end iterator for this traversal. |
|
Callback just before the iterator moves to the next block. |
|
Add edge and return whether To should be visited. From is nullopt for the root node. |
Protected Member Functions
Name |
Description |
|
Construct an uninitialized traversal base. |
Return this object cast to the CRTP derived type. |
|
Initialize post‐order traversal at given start node. |
Derived Classes
Name |
Description |
Traverse the blocks in a loop using a depth‐first search. |
|
Post‐order traversal using an external visited set. |
|
Post‐order traversal of a graph. |
Created with MrDocs