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

pub struct FragmentCfg<'a, D: Direction> { /* fields omitted */ }

🟢 Control flow graph of a sealed fragment.

Forward CFGs are prebuilt for all sealed fragments, and can be retrieved via Fragment::cfg.

Implementations

impl<'a, D: Direction> FragmentCfg<'a, D>[src]

pub unsafe fn from_unsealed(
    fragment: Fragment<'a>,
    unsealed: &'a UnsealedFragmentCfg<D>
) -> Self
[src]

Wrap an unsealed fragment CFG.

pub fn fragment(&self) -> Fragment<'a>[src]

Return parent fragment.

pub fn entry(&self) -> BasicBlock<'a>[src]

Return the entry basic block wrt to CFG direction.

pub fn exit(&self) -> BasicBlock<'a>[src]

Return the exit basic block wrt to CFG direction.

pub fn pred(
    &self,
    basic_block: BasicBlock<'a>
) -> impl Iterator<Item = Edge<'a>> + '_
[src]

Return an iterator over 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: BasicBlock<'a>
) -> impl Iterator<Item = Edge<'a>> + '_
[src]

Return an iterator over 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 = BasicBlock<'a>> + '_[src]

Return a preorder iterator over basic blocks.

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

Return a reverse preorder iterator over basic blocks.

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

Return a postorder iterator over basic blocks.

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

Return a reverse postorder iterator over basic blocks.

Trait Implementations

impl<'a, D: Clone + Direction> Clone for FragmentCfg<'a, D>[src]

impl<'a, D: Copy + Direction> Copy for FragmentCfg<'a, D>[src]

Auto Trait Implementations

impl<'a, D> RefUnwindSafe for FragmentCfg<'a, D> where
    D: RefUnwindSafe

impl<'a, D> Send for FragmentCfg<'a, D> where
    D: Sync

impl<'a, D> Sync for FragmentCfg<'a, D> where
    D: Sync

impl<'a, D> Unpin for FragmentCfg<'a, D>

impl<'a, D> UnwindSafe for FragmentCfg<'a, D> where
    D: RefUnwindSafe

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.