This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Copy rename followup...
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: 03 Mar 2004 08:07:41 -0500
- Subject: [tree-ssa] Copy rename followup...
Huh, somehow I missed checking in the gate for copy renaming.
Im also checking in a change which should also have been included which
makes any temps created by SSA->normal inherit the artificial flag from
the original variable. This will prevent copy renmaming from "undoing"
any overlapping live range repairs that SSA->normal has done for passes
like DOM.
Bootstrapped, verified, etc on i686-pc-linux-gnu
Andrew
Index: tree-ssa-copyrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-copyrename.c,v
retrieving revision 1.1.2.1
diff -c -p -r1.1.2.1 tree-ssa-copyrename.c
*** tree-ssa-copyrename.c 1 Mar 2004 14:37:55 -0000 1.1.2.1
--- tree-ssa-copyrename.c 2 Mar 2004 16:35:06 -0000
*************** rename_ssa_copies (void)
*** 334,344 ****
delete_var_map (map);
}
struct tree_opt_pass pass_rename_ssa_copies =
{
"copyrename", /* name */
! NULL, /* gate */
rename_ssa_copies, /* execute */
NULL, /* sub */
NULL, /* next */
--- 334,349 ----
delete_var_map (map);
}
+ static bool
+ gate_copyrename (void)
+ {
+ return flag_tree_copyrename != 0;
+ }
struct tree_opt_pass pass_rename_ssa_copies =
{
"copyrename", /* name */
! gate_copyrename, /* gate */
rename_ssa_copies, /* execute */
NULL, /* sub */
NULL, /* next */
Index: tree-ssa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa.c,v
retrieving revision 1.1.4.207
diff -c -p -r1.1.4.207 tree-ssa.c
*** tree-ssa.c 27 Feb 2004 12:41:36 -0000 1.1.4.207
--- tree-ssa.c 2 Mar 2004 16:35:07 -0000
*************** create_temp (tree t)
*** 966,971 ****
--- 966,972 ----
if (name == NULL)
name = "temp";
tmp = create_tmp_var (type, name);
+ DECL_ARTIFICIAL (tmp) = DECL_ARTIFICIAL (t);
add_referenced_tmp_var (tmp);
/* add_referenced_tmp_var will create the annotation and set up some