Lib/Source/Translate.cpp
/**
 * Translate an expression to a simple expression, generating
 * instructions along the way.
 */
Translate an expression to a simple expression, generating
instructions along the way.
Translate an expression to a simple expression generating instructions along the way .
Expr::Ptr simplify(Instr::List *seq, Expr::Ptr e) {
  if (e->isSimple()) {
    return e;
  }
  Var tmp_var = VarGen::fresh();
  Instr::List tmp;
  tmp << varAssign(tmp_var, e);
  *seq << tmp;
  return mkVar(tmp_var);
}
Expr :: Ptr simplify ( Instr :: List * seq , Expr :: Ptr e ) { if ( e -> isSimple ( ) ) { return e ; } Var tmp_var = VarGen :: fresh ( ) ; Instr :: List tmp ; tmp << varAssign ( tmp_var , e ) ; * seq << tmp ; return mkVar ( tmp_var ) ; }
Translate an expression to a simple expression, generating
 instructions along the way.
Translate an expression to a simple expression generating instructions along the way .
//tmp.front().comment("simplify varAssign");