flowistry_pdg::rustc::mir::traversal

Struct Postorder

Source
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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<I> IntoIterator for I
where I: Iterator,

Source§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = I

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.