diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-18 07:46:33 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-18 07:46:33 +0000 |
commit | d471893dcbdfab38ec021b746517d648db7dbb42 (patch) | |
tree | 699c6e9907b0c33f5cd057a408e8a232bd118ec9 /gcc/tree-ssa-copyrename.c | |
parent | b4a82ea7cc767f1abe921b835ff0324c082a8231 (diff) | |
download | gcc-d471893dcbdfab38ec021b746517d648db7dbb42.tar.gz |
* tree.h (struct tree_decl): Add gimple_formal_temp.
(DECL_GIMPLE_FORMAL_TEMP_P): New.
* gimplify.c (pop_gimplify_context): Clear it.
(lookup_tmp_var): Set it, if is_formal.
(gimplify_init_constructor): Use rhs_predicate_for for COMPLEX.
Use is_gimple_val for VECTOR. Simplify return value.
(gimplify_save_expr): Use and set DECL_GIMPLE_FORMAL_TEMP_P.
(gimplify_expr): Likewise.
* tree-gimple.c (is_gimple_formal_tmp_rhs): Rename from
is_gimple_tmp_rhs for clarity. Update all callers.
(is_gimple_reg_rhs): Simplify logic.
(is_gimple_formal_tmp_var): Rename from is_gimple_tmp_var for
clarity; use DECL_GIMPLE_FORMAL_TEMP_P.
(is_gimple_formal_tmp_reg): Similarly.
* tree-gimple.h: Update decls.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Use
DECL_IGNORED_P, not DECL_ARTIFICIAL. Tidy formatting.
* tree-ssa-live.c (var_union, type_var_init): Likewise.
java/
* java-gimplify.c (java_gimplify_expr): Move '2' handling into
default case. Treat '<' similarly. Update for
is_gimple_formal_tmp_var name change.
testsuite/
* gcc.dg/20040206-1.c: XFAIL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86176 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-copyrename.c')
-rw-r--r-- | gcc/tree-ssa-copyrename.c | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 74667f8bc61..a05935f5742 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -118,7 +118,7 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) int p1, p2, p3; tree root1, root2; var_ann_t ann1, ann2, ann3; - bool gimp1, gimp2; + bool ign1, ign2; #ifdef ENABLE_CHECKING if (TREE_CODE (var1) != SSA_NAME || TREE_CODE (var2) != SSA_NAME) @@ -195,27 +195,25 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) return; } - gimp1 = (TREE_CODE (root1) == VAR_DECL && DECL_ARTIFICIAL (root1)); - gimp2 = (TREE_CODE (root2) == VAR_DECL && DECL_ARTIFICIAL (root2)); + ign1 = TREE_CODE (root1) == VAR_DECL && DECL_IGNORED_P (root1); + ign2 = TREE_CODE (root2) == VAR_DECL && DECL_IGNORED_P (root2); /* Never attempt to coalesce 2 user variables unless one is an inline variable. */ - if (!gimp1 && !gimp2) + if (!ign1 && !ign2) { if (DECL_FROM_INLINE (root2)) - gimp2 = true; - else - if (DECL_FROM_INLINE (root1)) - gimp1 = true; - else - { - if (debug) - fprintf (debug, " : 2 different USER vars. No coalesce.\n"); - return; - } + ign2 = true; + else if (DECL_FROM_INLINE (root1)) + ign1 = true; + else + { + if (debug) + fprintf (debug, " : 2 different USER vars. No coalesce.\n"); + return; + } } - /* Don't coalesce if there are two different memory tags. */ if (ann1->type_mem_tag && ann2->type_mem_tag && ann1->type_mem_tag != ann2->type_mem_tag) @@ -237,16 +235,15 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) } else { - gimp2 = true; - gimp1 = false; + ign2 = true; + ign1 = false; } } - else - if (default_def (root2)) - { - gimp1 = true; - gimp2 = false; - } + else if (default_def (root2)) + { + ign1 = true; + ign2 = false; + } /* Don't coalesce if the two variables aren't type compatible. */ if (!lang_hooks.types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2))) @@ -261,11 +258,10 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) /* Set the root variable of the partition to the better choice, if there is one. */ - if (!gimp2) + if (!ign2) replace_ssa_name_symbol (partition_to_var (map, p3), root2); - else - if (!gimp1) - replace_ssa_name_symbol (partition_to_var (map, p3), root1); + else if (!ign1) + replace_ssa_name_symbol (partition_to_var (map, p3), root1); /* Update the various flag widgitry of the current base representative. */ ann3 = var_ann (SSA_NAME_VAR (partition_to_var (map, p3))); |