Hello,

I appreciate your help in figuring what is considered a valid sequence
of operations for creating a new variable in the tree level.

Is the following sequence OK -

 tmp_var = create_tmp_var (type, "_new_");
 add_referenced_tmp_var (tmp_var);
 mark_sym_for_renaming (tmp_var);

Or should I also use ssa functions as follows:

temp = create_tmp_var (TREE_TYPE (expr), "pretmp");
add_referenced_tmp_var (temp);
newexpr = build (MODIFY_EXPR, TREE_TYPE (expr), temp, newexpr);
name = make_ssa_name (temp, newexpr);
TREE_OPERAND (newexpr, 0) = name;
tsi_link_after (&tsi, newexpr, TSI_CONTINUE_LINKING);

Also, I do not understand what is the usage of each function
in creating the new variable.

Thanks,
Revital

Reply via email to