pub struct DomTree { /* private fields */ }
Implementations§
Source§impl DomTree
impl DomTree
pub fn compute(cfg: &ControlFlowGraph) -> Self
Sourcepub fn idom(&self, block: BasicBlockId) -> Option<BasicBlockId>
pub fn idom(&self, block: BasicBlockId) -> Option<BasicBlockId>
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: BasicBlockId,
block2: BasicBlockId,
) -> bool
pub fn strictly_dominates( &self, block1: BasicBlockId, block2: BasicBlockId, ) -> bool
Returns true
if block1 strictly dominates block2.
Sourcepub fn dominates(&self, block1: BasicBlockId, block2: BasicBlockId) -> bool
pub fn dominates(&self, block1: BasicBlockId, block2: BasicBlockId) -> bool
Returns true
if block1 dominates block2.
Sourcepub fn is_reachable(&self, block: BasicBlockId) -> bool
pub fn is_reachable(&self, block: BasicBlockId) -> bool
Returns true
if block is reachable from the entry block.
Sourcepub fn rpo(&self) -> &[BasicBlockId]
pub fn rpo(&self) -> &[BasicBlockId]
Returns blocks in RPO.
Sourcepub fn compute_df(&self, cfg: &ControlFlowGraph) -> DFSet
pub fn compute_df(&self, cfg: &ControlFlowGraph) -> DFSet
Compute dominance frontiers of each blocks.
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