[−][src]Struct llhd::analysis::DominatorTree
A block dominator tree.
Records for every block which other blocks in the CFG have to be traversed to reach it. And vice versa, which blocks a block precedeces in all cases.
Methods
impl DominatorTree
[src]
pub fn new(unit: &Unit, pred: &PredecessorTable) -> Self
[src]
use unit.domtree() instead
Compute the dominator tree of a function or process.
This implementation is based on 1.
pub fn blocks_post_order(&self) -> &[Block]
[src]
Get the blocks in the original CFG in post-order.
pub fn block_order(&self, block: Block) -> usize
[src]
Get the post-order index of a block.
pub fn dominates(&self, dominator: Block, follower: Block) -> bool
[src]
Check if a block dominates another.
pub fn dominator(&self, block: Block) -> Block
[src]
Get the immediate dominator of a block.
pub fn dominators(&self, follower: Block) -> &HashSet<Block>
[src]
Get the dominators of a block.
pub fn dominated_by(&self, dominator: Block) -> &HashSet<Block>
[src]
Get the followers of a block, i.e. the blocks it dominates.
pub fn block_dominates_block(&self, parent: Block, child: Block) -> bool
[src]
Check if a block dominates another block.
pub fn inst_dominates_block(
&self,
unit: &Unit,
parent: Inst,
child: Block
) -> bool
[src]
&self,
unit: &Unit,
parent: Inst,
child: Block
) -> bool
Check if an instruction dominates a block.
pub fn value_dominates_block(
&self,
unit: &Unit,
parent: Value,
child: Block
) -> bool
[src]
&self,
unit: &Unit,
parent: Value,
child: Block
) -> bool
Check if a value definition dominates a block.
pub fn block_dominates_inst(
&self,
unit: &Unit,
parent: Block,
child: Inst
) -> bool
[src]
&self,
unit: &Unit,
parent: Block,
child: Inst
) -> bool
Check if a block dominates an instruction.
A block does not dominate instructions within itself.
pub fn inst_dominates_inst(
&self,
unit: &Unit,
parent: Inst,
child: Inst
) -> bool
[src]
&self,
unit: &Unit,
parent: Inst,
child: Inst
) -> bool
Check if an instruction dominates another instruction.
pub fn value_dominates_inst(
&self,
unit: &Unit,
parent: Value,
child: Inst
) -> bool
[src]
&self,
unit: &Unit,
parent: Value,
child: Inst
) -> bool
Check if a value definition dominates an instruction.
pub fn block_dominates_value(
&self,
unit: &Unit,
parent: Block,
child: Value
) -> bool
[src]
&self,
unit: &Unit,
parent: Block,
child: Value
) -> bool
Check if a block dominates a value definition.
A block does not dominate values within itself.
pub fn inst_dominates_value(
&self,
unit: &Unit,
parent: Inst,
child: Value
) -> bool
[src]
&self,
unit: &Unit,
parent: Inst,
child: Value
) -> bool
Check if an instruction dominates a value definition.
pub fn value_dominates_value(
&self,
unit: &Unit,
parent: Value,
child: Value
) -> bool
[src]
&self,
unit: &Unit,
parent: Value,
child: Value
) -> bool
Check if a value definition dominates another value definition.
Trait Implementations
impl Clone for DominatorTree
[src]
fn clone(&self) -> DominatorTree
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DominatorTree
[src]
Auto Trait Implementations
impl RefUnwindSafe for DominatorTree
impl Send for DominatorTree
impl Sync for DominatorTree
impl Unpin for DominatorTree
impl UnwindSafe for DominatorTree
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,