pub struct Postorder<'a, 'tcx> {
basic_blocks: &'a IndexSlice<BasicBlock, BasicBlockData<'tcx>>,
visited: BitSet<BasicBlock>,
visit_stack: Vec<(BasicBlock, impl DoubleEndedIterator + 'a), Global>,
root_is_start_block: bool,
}
Expand description
Postorder traversal of a graph.
Postorder traversal is when each node is visited after all of its successors, except when the successor is only reachable by a back-edge. If you are familiar with some basic graph theory, then this performs a depth first search and returns nodes in order of completion time.
A
/ \
/ \
B C
\ /
\ /
D
A Postorder traversal of this graph is D B C A
or D C B A
Fields§
§basic_blocks: &'a IndexSlice<BasicBlock, BasicBlockData<'tcx>>
§visited: BitSet<BasicBlock>
§visit_stack: Vec<(BasicBlock, impl DoubleEndedIterator + 'a), Global>
§root_is_start_block: bool
Auto Trait Implementations§
impl<'a, 'tcx> !RefUnwindSafe for Postorder<'a, 'tcx>
impl<'a, 'tcx> !Send for Postorder<'a, 'tcx>
impl<'a, 'tcx> !Sync for Postorder<'a, 'tcx>
impl<'a, 'tcx> Unpin for Postorder<'a, 'tcx>
impl<'a, 'tcx> !UnwindSafe for Postorder<'a, 'tcx>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more