pub trait SSABasicBlock<Cfg: SSAConfig>: DirectedGraphNode {
    fn prepend_statement(&mut self, stmt: Cfg::Statement);
    fn statements<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = &'a Cfg::Statement> + 'a>; fn statements_mut<'a>(
        &'a mut self
    ) -> Box<dyn Iterator<Item = &'a mut Cfg::Statement> + 'a>; fn variables_written(&self) -> HashSet<Cfg::Variable> { ... } fn has_phi_statement(&self, var: &Cfg::Variable) -> bool { ... } fn insert_phi_statement(
        &mut self,
        var: &Cfg::Variable,
        env: &Cfg::Environment
    ) { ... } fn update_phi_statements(&mut self, env: &Cfg::Environment) { ... } fn insert_ssa_variables(
        &mut self,
        env: &mut Cfg::Environment
    ) -> SSAResult<()> { ... } }
Expand description

A basic block containing a (possibly empty) list of statements.

Required Methods

Add the given statement to the front of the basic block.

Returns an iterator over the statements of the basic block.

Note: We have to use dynamic dispatch here because returning impl Trait from trait methods is not a thing yet. For details, see rust-lang.github.io/impl-trait-initiative/RFCs/rpit-in-traits.html)

Returns an iterator over mutable references to the statements of the basic block.

Note: We have to use dynamic dispatch here because returning impl Trait from trait methods is not a thing yet. For details, see rust-lang.github.io/impl-trait-initiative/RFCs/rpit-in-traits.html)

Provided Methods

Returns the set of variables written by the basic block.

Returns true if the basic block has a phi statement for the given variable.

Inserts a new phi statement for the given variable at the top of the basic block.

Updates the RHS of each phi statement in the basic block with the SSA variable versions from the given environment.

Updates each variable to the corresponding SSA variable, in each statement in the basic block.

Implementors