pub struct ControlDependenceGraph<'m> { /* private fields */ }
Expand description
The control dependence graph for a particular function. https://en.wikipedia.org/wiki/Data_dependency#Control_Dependency
To construct a ControlDependenceGraph
, use
FunctionAnalysis
, which you can get
from ModuleAnalysis
.
Implementations§
Source§impl<'m> ControlDependenceGraph<'m>
impl<'m> ControlDependenceGraph<'m>
Sourcepub fn get_imm_control_dependencies<'s>(
&'s self,
block: &'m Name,
) -> impl Iterator<Item = &'m Name> + 's
pub fn get_imm_control_dependencies<'s>( &'s self, block: &'m Name, ) -> impl Iterator<Item = &'m Name> + 's
Get the blocks that block
has an immediate control dependency on.
Sourcepub fn get_control_dependencies<'s>(
&'s self,
block: &'m Name,
) -> impl Iterator<Item = &'m Name> + 's
pub fn get_control_dependencies<'s>( &'s self, block: &'m Name, ) -> impl Iterator<Item = &'m Name> + 's
Get the blocks that block
has a control dependency on (including
transitively).
This is the block’s immediate control dependencies, along with all the control dependencies of those dependencies, and so on recursively.
Sourcepub fn get_imm_control_dependents<'s>(
&'s self,
block: &'m Name,
) -> impl Iterator<Item = CFGNode<'m>> + 's
pub fn get_imm_control_dependents<'s>( &'s self, block: &'m Name, ) -> impl Iterator<Item = CFGNode<'m>> + 's
Get the blocks that have an immediate control dependency on block
.
Sourcepub fn get_control_dependents<'s>(
&'s self,
block: &'m Name,
) -> impl Iterator<Item = CFGNode<'m>> + 's
pub fn get_control_dependents<'s>( &'s self, block: &'m Name, ) -> impl Iterator<Item = CFGNode<'m>> + 's
Get the blocks that have a control dependency on block
(including
transitively).
This is the block’s immediate control dependents, along with all the control dependents of those dependents, and so on recursively.
Sourcepub fn is_control_dependent(&self, block_a: &'m Name, block_b: &'m Name) -> bool
pub fn is_control_dependent(&self, block_a: &'m Name, block_b: &'m Name) -> bool
Does block_a
have a control dependency on block_b
?
Auto Trait Implementations§
impl<'m> Freeze for ControlDependenceGraph<'m>
impl<'m> RefUnwindSafe for ControlDependenceGraph<'m>
impl<'m> Send for ControlDependenceGraph<'m>
impl<'m> Sync for ControlDependenceGraph<'m>
impl<'m> Unpin for ControlDependenceGraph<'m>
impl<'m> UnwindSafe for ControlDependenceGraph<'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
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>
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>
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