[][src]Struct llhd::analysis::DominatorTree

pub struct DominatorTree { /* fields omitted */ }

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]

Deprecated since 0.13.0:

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]

Check if an instruction dominates a block.

pub fn value_dominates_block(
    &self,
    unit: &Unit,
    parent: Value,
    child: Block
) -> bool
[src]

Check if a value definition dominates a block.

pub fn block_dominates_inst(
    &self,
    unit: &Unit,
    parent: Block,
    child: Inst
) -> bool
[src]

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]

Check if an instruction dominates another instruction.

pub fn value_dominates_inst(
    &self,
    unit: &Unit,
    parent: Value,
    child: Inst
) -> bool
[src]

Check if a value definition dominates an instruction.

pub fn block_dominates_value(
    &self,
    unit: &Unit,
    parent: Block,
    child: Value
) -> bool
[src]

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]

Check if an instruction dominates a value definition.

pub fn value_dominates_value(
    &self,
    unit: &Unit,
    parent: Value,
    child: Value
) -> bool
[src]

Check if a value definition dominates another value definition.

Trait Implementations

impl Clone for DominatorTree[src]

impl Debug for DominatorTree[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.