Struct llvm_ir_analysis::ControlDependenceGraph
source · 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
?