On Tue, Apr 13, 2010 at 01:14:11PM -0500, Sebastian Pop wrote: > /* Create a new temp variable of type TYPE. Add GIMPLE_ASSIGN to assign EXP > to the new variable. */ > > static gimple > ifc_temp_var (tree type, tree exp) > { > const char *name = "_ifc_"; > tree var, new_name; > gimple stmt; > > /* Create new temporary variable. */ > var = create_tmp_var (type, name); > add_referenced_var (var); > > /* Build new statement to assign EXP to new variable. */ > stmt = gimple_build_assign (var, exp); > > /* Get SSA name for the new variable and set make new statement > its definition statement. */ > new_name = make_ssa_name (var, stmt); > gimple_assign_set_lhs (stmt, new_name); > SSA_NAME_DEF_STMT (new_name) = stmt; > update_stmt (stmt); > > return stmt; > } > > What is missing in this function to make it handle non scalar types?
if (!is_gimple_reg (var)) you shouldn't create SSA name and change the lhs of the stmt. Jakub