pub struct Postorder<'a, 'tcx, C> {
basic_blocks: &'a IndexSlice<BasicBlock, BasicBlockData<'tcx>>,
visited: BitSet<BasicBlock>,
visit_stack: Vec<(BasicBlock, impl DoubleEndedIterator + 'a)>,
root_is_start_block: bool,
extra: C,
}
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)>
§root_is_start_block: bool
§extra: C
Auto Trait Implementations§
impl<'a, 'tcx, C> Freeze for Postorder<'a, 'tcx, C>where
C: Freeze,
impl<'a, 'tcx, C> !RefUnwindSafe for Postorder<'a, 'tcx, C>
impl<'a, 'tcx, C> Send for Postorder<'a, 'tcx, C>where
C: Send,
impl<'a, 'tcx, C> Sync for Postorder<'a, 'tcx, C>where
C: Sync,
impl<'a, 'tcx, C> Unpin for Postorder<'a, 'tcx, C>where
C: Unpin,
impl<'a, 'tcx, C> !UnwindSafe for Postorder<'a, 'tcx, C>
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