pub trait SSAStatement<Cfg: SSAConfig>: Clone {
    fn variables_written(&self) -> HashSet<Cfg::Variable>;
    fn new_phi_statement(name: &Cfg::Variable, env: &Cfg::Environment) -> Self;
    fn is_phi_statement(&self) -> bool;
    fn is_phi_statement_for(&self, var: &Cfg::Variable) -> bool;
    fn ensure_phi_argument(&mut self, env: &Cfg::Environment);
    fn insert_ssa_variables(
        &mut self,
        env: &mut Cfg::Environment
    ) -> SSAResult<()>; }
Expand description

A statement in the language.

Required Methods

Returns the set of variables written by statement.

Returns a new phi statement (with empty RHS) for the given variable.

Returns true iff the statement is a phi statement.

Returns true iff the statement is a phi statement for the given variable.

Ensure that the phi expression argument list of a phi statement contains the current version of the variable, according to the given environment.

Panics if the statement is not a phi statement.

Replace each variable occurring in the statement by the corresponding versioned SSA variable.

Implementors