[][src]Struct gf::code::cfa::ControlFlowGraph

pub struct ControlFlowGraph { /* fields omitted */ }

Control flow graph of a code fragment.

Methods

impl ControlFlowGraph[src]

pub fn new(
    module: &Sealed<Module>,
    fragment: FragmentId,
    order: TraversalOrder
) -> Self
[src]

Build the control flow graph of a code fragment.

The order argument controls the traversal order which will be returned from the basic_blocks method.

pub unsafe fn new_unsealed(
    module: &Module,
    fragment: FragmentId,
    order: TraversalOrder
) -> Self
[src]

Build the control flow graph of an unsealed code fragment.

The order argument controls the traversal order which will be returned from the basic_blocks method.

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

Return the entry basic block.

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

Return the exit basic block.

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

Return basic blocks in the traversal order that was chosen during CFG construction.

pub fn basic_block_order(&self) -> TraversalOrder[src]

Return the traversal order that basic_block uses.

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

Return predecessor edges of a basic block in no specific order.

Errors

  • Panics if basic_block is not a valid basic block ID.

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

Return successor edges of a basic block in no specific order.

Errors

  • Panics if basic_block is not a valid basic block ID.

Auto Trait Implementations

impl Send for ControlFlowGraph

impl Sync for ControlFlowGraph

impl Unpin for ControlFlowGraph

impl UnwindSafe for ControlFlowGraph

impl RefUnwindSafe for ControlFlowGraph

Blanket Implementations

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

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

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.

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

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

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