pub struct ControlFlowGraph {
pub root: usize,
pub predecessors: Vec<Vec<usize>>,
pub successors: Vec<Vec<usize>>,
pub dominators: DominatorTree,
pub dominance_frontier: Vec<Vec<usize>>,
pub postdominators: PostDominatorTree,
pub postdominance_frontier: Vec<Vec<usize>>,
pub controllers: Vec<Vec<usize>>,
pub control_dependents: Vec<Vec<usize>>,
pub sccs: Vec<StronglyConnectedRegion>,
pub scc_for_block: Vec<usize>,
pub loops: Vec<NaturalLoop>,
}Expand description
Complete analysis of one reachable dense CFG.
Fields§
§root: usize§predecessors: Vec<Vec<usize>>§successors: Vec<Vec<usize>>§dominators: DominatorTree§dominance_frontier: Vec<Vec<usize>>§postdominators: PostDominatorTree§postdominance_frontier: Vec<Vec<usize>>§controllers: Vec<Vec<usize>>§control_dependents: Vec<Vec<usize>>§sccs: Vec<StronglyConnectedRegion>§scc_for_block: Vec<usize>§loops: Vec<NaturalLoop>Implementations§
Source§impl ControlFlowGraph
impl ControlFlowGraph
Sourcepub fn analyze(
successors: Vec<Vec<usize>>,
root: usize,
) -> Result<Self, CfgError>
pub fn analyze( successors: Vec<Vec<usize>>, root: usize, ) -> Result<Self, CfgError>
Analyze a graph without changing the caller’s block numbering.
Sourcepub fn analyze_structure(
successors: Vec<Vec<usize>>,
root: usize,
) -> Result<Self, CfgError>
pub fn analyze_structure( successors: Vec<Vec<usize>>, root: usize, ) -> Result<Self, CfgError>
Analyze dominance, post-dominance, loops, and SCCs without constructing either dominance frontier or the potentially dense control-dependence relation.
Placement clients which only need legal region boundaries should use this mode. Its graph tables remain linear in the input CFG size.
Trait Implementations§
Source§impl Clone for ControlFlowGraph
impl Clone for ControlFlowGraph
Source§fn clone(&self) -> ControlFlowGraph
fn clone(&self) -> ControlFlowGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ControlFlowGraph
impl Debug for ControlFlowGraph
impl Eq for ControlFlowGraph
Source§impl PartialEq for ControlFlowGraph
impl PartialEq for ControlFlowGraph
Source§impl SsaCfg for ControlFlowGraph
impl SsaCfg for ControlFlowGraph
type FrontierIter<'a> = Copied<Iter<'a, usize>>
fn root(&self) -> usize
fn predecessors(&self) -> &[Vec<usize>]
fn successors(&self) -> &[Vec<usize>]
fn dominator_children(&self) -> &[Vec<usize>]
fn dominance_frontier_len(&self) -> usize
fn dominance_frontier(&self, block: usize) -> Self::FrontierIter<'_>
impl StructuralPartialEq for ControlFlowGraph
Auto Trait Implementations§
impl Freeze for ControlFlowGraph
impl RefUnwindSafe for ControlFlowGraph
impl Send for ControlFlowGraph
impl Sync for ControlFlowGraph
impl Unpin for ControlFlowGraph
impl UnsafeUnpin for ControlFlowGraph
impl UnwindSafe for ControlFlowGraph
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