[][src]Struct gf::pivot::fragment::UnsealedFragmentCfg

pub struct UnsealedFragmentCfg<D: Direction> { /* fields omitted */ }

⚪ Control flow graph of an unsealed fragment.

Implementations

impl<D: Direction> UnsealedFragmentCfg<D>[src]

pub fn new(module: &UnsealedModule, fragment: &UnsealedFragment) -> Self[src]

Build the CFG of an unsealed fragment.

Errors

  • Panics if a basic block reachable from the entry does not exist.

pub fn entry(&self) -> BasicBlockId[src]

Return the entry basic block wrt to CFG direction.

pub fn exit(&self) -> BasicBlockId[src]

Return the exit basic block wrt to CFG direction.

pub fn contains(&self, basic_block: BasicBlockId) -> bool[src]

Return whether this CFG contains a basic block.

pub fn pred(&self, basic_block: BasicBlockId) -> &[UnsealedEdge][src]

Return predecessor edges of a basic block wrt to CFG direction.

Errors

  • Panics if the basic block does not belong to this CFG.

pub fn succ(&self, basic_block: BasicBlockId) -> &[UnsealedEdge][src]

Return successor edges of a basic block wrt to CFG direction.

Errors

  • Panics if the basic block does not belong to this CFG.

pub fn preorder(&self) -> impl Iterator<Item = BasicBlockId> + '_[src]

Return a preorder iterator over basic blocks.

pub fn preorder_index(&self, basic_block: BasicBlockId) -> usize[src]

Return preorder index of a basic block.

Errors

  • Panics if the basic block does not belong to this CFG.

pub fn preorder_index_map(&self) -> &HashMap<BasicBlockId, usize>[src]

Return the entire preorder index map.

pub fn reverse_preorder(&self) -> impl Iterator<Item = BasicBlockId> + '_[src]

Return a reverse preorder iterator over basic blocks.

pub fn postorder(&self) -> impl Iterator<Item = BasicBlockId> + '_[src]

Return a postorder iterator over basic blocks.

pub fn postorder_index(&self, basic_block: BasicBlockId) -> usize[src]

Return postorder index of a basic block.

Errors

  • Panics if the basic block does not belong to this CFG.

pub fn postorder_index_map(&self) -> &HashMap<BasicBlockId, usize>[src]

Return the entire postorder index map.

pub fn reverse_postorder(&self) -> impl Iterator<Item = BasicBlockId> + '_[src]

Return a reverse postorder iterator over basic blocks.

Trait Implementations

impl<D: Clone + Direction> Clone for UnsealedFragmentCfg<D>[src]

impl<D: Debug + Direction> Debug for UnsealedFragmentCfg<D>[src]

Auto Trait Implementations

impl<D> RefUnwindSafe for UnsealedFragmentCfg<D> where
    D: RefUnwindSafe

impl<D> Send for UnsealedFragmentCfg<D> where
    D: Send

impl<D> Sync for UnsealedFragmentCfg<D> where
    D: Sync

impl<D> Unpin for UnsealedFragmentCfg<D> where
    D: Unpin

impl<D> UnwindSafe for UnsealedFragmentCfg<D> where
    D: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.