Function insert_ssa_variables

Source
pub fn insert_ssa_variables<Cfg: SSAConfig>(
    basic_blocks: &mut [Cfg::BasicBlock],
    dominator_tree: &DominatorTree<Cfg::BasicBlock>,
    env: &mut Cfg::Environment,
) -> SSAResult<()>
Expand description

Traverses the dominator tree in pre-order and for each block, the function

  1. Renames all variables to SSA form, keeping track of the current version of each variable.
  2. Updates phi expression arguments in each successor of the current block, adding the correct versioned arguments to the expression.