Post-order traversal of a graph.
Declared in <llvm/ADT/PostOrderIterator.h>
template<
typename GraphT,
typename SetType = po_detail::DefaultSet<GraphT>>
class PostOrderTraversal
: public PostOrderTraversalBase<PostOrderTraversal<GraphT, SetType>, GraphTraits<GraphT>>
Traversal state lives in this object, not in the iterators, so its lifetime must outlive the iterators. Prefer:
for (BasicBlock *BB : post_order(F)) { ... }
Avoid binding a temporary traversal into make_filter_range; store the traversal object first. Only a single traversal is supported.
| Name | Description |
|---|---|
PostOrderTraversalBase<PostOrderTraversal<GraphT, SetType>, GraphTraits<GraphT>> | CRTP base for a single post-order graph walk. |
| Name | Description |
|---|---|
iterator | Input iterator yielding nodes in post-order during a single traversal. |
| Name | Description |
|---|---|
PostOrderTraversal [constructor] | Constructors |
begin | Iterator to the current post-order node, or end if none remain. |
end | Past-the-end iterator for this traversal. |
finishPostorder | Callback just before the iterator moves to the next block. |
insertEdge | insertEdge overloads |
| Name | Description |
|---|---|
derived | Return this object cast to the CRTP derived type. |
init | Initialize post-order traversal at given start node. |