pub struct Preorder<'a, 'tcx> {
body: &'a Body<'tcx>,
visited: BitSet<BasicBlock>,
worklist: Vec<BasicBlock, Global>,
root_is_start_block: bool,
}
Expand description
Preorder traversal of a graph.
Preorder traversal is when each node is visited after at least one of its predecessors. If you are familiar with some basic graph theory, then this performs a depth first search and returns nodes in order of discovery time.
A
/ \
/ \
B C
\ /
\ /
D
A preorder traversal of this graph is either A B D C
or A C D B
Fields§
§body: &'a Body<'tcx>
§visited: BitSet<BasicBlock>
§worklist: Vec<BasicBlock, Global>
§root_is_start_block: bool
Auto Trait Implementations§
impl<'a, 'tcx> !RefUnwindSafe for Preorder<'a, 'tcx>
impl<'a, 'tcx> !Send for Preorder<'a, 'tcx>
impl<'a, 'tcx> !Sync for Preorder<'a, 'tcx>
impl<'a, 'tcx> Unpin for Preorder<'a, 'tcx>
impl<'a, 'tcx> !UnwindSafe for Preorder<'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