[PATCH] Dispose of non-gimplifier users of is_gimple_tmp_var
Nathanael Nerode
neroden@fastmail.fm
Mon Aug 16 11:54:00 GMT 2004
Both of these uses appear to be an attempt to retain better debugging
information. Accordingly, they are checking the wrong thing.
Currently bootstrapping.
If successful with no regressions, OK to commit?
* tree-ssa-copyrename.c (copy_rename_partition_coalesce):
Check for arificial variables, not is_gimple_tmp_var.
* tree-ssa-live.c (var_union): Likewise.
Index: tree-ssa-copyrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-copyrename.c,v
retrieving revision 2.8
diff -u -p -r2.8 tree-ssa-copyrename.c
--- tree-ssa-copyrename.c 28 Jul 2004 05:13:08 -0000 2.8
+++ tree-ssa-copyrename.c 16 Aug 2004 11:43:51 -0000
@@ -195,8 +195,8 @@ copy_rename_partition_coalesce (var_map
return;
}
- gimp1 = is_gimple_tmp_var (root1);
- gimp2 = is_gimple_tmp_var (root2);
+ gimp1 = (TREE_CODE (root1) == VAR_DECL && DECL_ARTIFICAL(root1))
+ gimp2 = (TREE_CODE (root2) == VAR_DECL && DECL_ARTIFICAL(root2))
/* Never attempt to coalesce 2 user variables unless one is an inline
variable. */
Index: tree-ssa-live.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-live.c,v
retrieving revision 2.13
diff -u -p -r2.13 tree-ssa-live.c
--- tree-ssa-live.c 9 Aug 2004 19:13:07 -0000 2.13
+++ tree-ssa-live.c 16 Aug 2004 11:43:52 -0000
@@ -135,7 +135,8 @@ var_union (var_map map, tree var1, tree
/* If there is no root_var set, or its not a user variable, set the
root_var to this one. */
- if (!root_var || is_gimple_tmp_var (root_var))
+ if (!root_var
+ || (TREE_CODE(root_var) == VAR_DECL && DECL_ARTIFICAL(root_var)))
{
other_var = root_var;
root_var = var2;
--
This space intentionally left blank.
More information about the Gcc-patches
mailing list