pub struct ControlFlowGraph<'m> { /* private fields */ }
Expand description
The control flow graph for a particular function.
To construct a ControlFlowGraph
, use
FunctionAnalysis
, which you can get
from ModuleAnalysis
.
Implementations§
Source§impl<'m> ControlFlowGraph<'m>
impl<'m> ControlFlowGraph<'m>
Sourcepub fn preds<'s>(
&'s self,
block: &'m Name,
) -> impl Iterator<Item = &'m Name> + 's
pub fn preds<'s>( &'s self, block: &'m Name, ) -> impl Iterator<Item = &'m Name> + 's
Get the predecessors of the basic block with the given Name
Sourcepub fn preds_of_return<'s>(&'s self) -> impl Iterator<Item = &'m Name> + 's
pub fn preds_of_return<'s>(&'s self) -> impl Iterator<Item = &'m Name> + 's
Get the predecessors of the special Return
node, i.e., get all blocks
which may directly return
Auto Trait Implementations§
impl<'m> Freeze for ControlFlowGraph<'m>
impl<'m> RefUnwindSafe for ControlFlowGraph<'m>
impl<'m> Send for ControlFlowGraph<'m>
impl<'m> Sync for ControlFlowGraph<'m>
impl<'m> Unpin for ControlFlowGraph<'m>
impl<'m> UnwindSafe for ControlFlowGraph<'m>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more