pub struct DomTree { /* private fields */ }Implementations§
Source§impl DomTree
impl DomTree
pub fn new() -> Self
pub fn clear(&mut self)
Sourcepub fn idom_of(&self, block: Block) -> Option<Block>
pub fn idom_of(&self, block: Block) -> Option<Block>
Returns the immediate dominator of the block.
Returns None if the block is unreachable from the entry block, or the block is the entry block itself.
Sourcepub fn strictly_dominates(&self, block1: Block, block2: Block) -> bool
pub fn strictly_dominates(&self, block1: Block, block2: Block) -> bool
Returns true if block1 strictly dominates block2.
Sourcepub fn dominates(&self, block1: Block, block2: Block) -> bool
pub fn dominates(&self, block1: Block, block2: Block) -> bool
Returns true if block1 dominates block2.
pub fn compute(&mut self, cfg: &ControlFlowGraph)
Sourcepub fn compute_df(&self, cfg: &ControlFlowGraph) -> DFSet
pub fn compute_df(&self, cfg: &ControlFlowGraph) -> DFSet
Compute dominance frontiers of each blocks.
Sourcepub fn is_reachable(&self, block: Block) -> bool
pub fn is_reachable(&self, block: Block) -> bool
Returns true if block is reachable from the entry block.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DomTree
impl RefUnwindSafe for DomTree
impl Send for DomTree
impl Sync for DomTree
impl Unpin for DomTree
impl UnwindSafe for DomTree
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