This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Creating new variable in tree level
- From: Revital1 Eres <ERES at il dot ibm dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 12 Jun 2007 17:52:19 +0300
- Subject: Creating new variable in tree level
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