Struct llvm_ir_analysis::DominatorTree[][src]

pub struct DominatorTree<'m> { /* fields omitted */ }
Expand description

The dominator tree for a particular function.

To construct a DominatorTree, use FunctionAnalysis, which you can get from ModuleAnalysis.

Implementations

Get the immediate dominator of the basic block with the given Name.

This will be None for the entry block or for any unreachable blocks, and Some for all other blocks.

A block bbX is the immediate dominator of bbY if and only if:

  • bbX strictly dominates bbY, i.e., bbX appears on every control-flow path from the entry block to bbY (but bbX =/= bbY)
  • Of the blocks that strictly dominate bbY, bbX is the closest to bbY (farthest from entry) along paths from the entry block to bbY

Get the immediate dominator of CFGNode::Return.

This will be the block bbX such that:

  • bbX strictly dominates CFGNode::Return, i.e., bbX appears on every control-flow path through the function (but bbX =/= CFGNode::Return)
  • Of the blocks that strictly dominate CFGNode::Return, bbX is the closest to CFGNode::Return (farthest from entry) along paths through the function

Get the children of the given basic block in the dominator tree, i.e., get all the blocks which are immediately dominated by block.

See notes on idom().

Does node_a dominate node_b?

Note that every node dominates itself by definition, so if node_a == node_b, this returns true. See also strictly_dominates()

Does node_a strictly dominate node_b?

This is the same as dominates(), except that if node_a == node_b, this returns false.

Get the Name of the entry block for the function

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.