pub struct Cfg { /* private fields */ }

Implementations

Returns the entry (first) block of the CFG.

Returns the number of basic blocks in the CFG.

Returns true if the CFG is empty.

Convert the CFG into SSA form.

Get the name of the corresponding function or template.

Get the file ID for the corresponding function or template.

Returns the parameter data for the corresponding function or template.

Returns the variable declaration for the CFG.

Returns an iterator over the set of variables defined by the CFG.

Returns the declaration of the given variable.

Returns the type of the given variable.

Returns an iterator over the basic blocks in the CFG. This iterator guarantees that if i dominates j, then i comes before j.

Returns a mutable iterator over the basic blocks in the CFG.

Returns the dominators of the given basic block. The basic block i dominates j if any path from the entry point to j must contain i. (Note that this relation is reflexive, so i always dominates itself.)

Returns the immediate dominator of the basic block (that is, the predecessor of the node in the CFG dominator tree), if it exists.

Get immediate successors of the basic block in the CFG dominator tree. (For a definition of the dominator relation, see CFG::get_dominators.)

Returns the dominance frontier of the basic block. The dominance frontier of i is defined as all basic blocks j such that i dominates an immediate predecessor of j, but i does not strictly dominate j. (j is where is dominance ends.)

Returns the predecessors of the given basic block.

Returns the successors of the given basic block.

Returns all block in the interval [start_block, end_block). That is, all successors of the starting block (including the starting block) which are also predecessors of the end block.

Returns the basic blocks corresponding to the true branch of the if-statement at the end of the given header block.

Panics

This method panics if the given block does not end with an if-statement node.

Returns the basic blocks corresponding to the false branch of the if-statement at the end of the given header block.

Panics

This method panics if the given block does not end with an if-statement node.

Trait Implementations

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.