OSDN Git Service

2007-02-16 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Feb 2007 09:34:24 +0000 (09:34 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Feb 2007 09:34:24 +0000 (09:34 +0000)
* tree-flow-inline.h (single_imm_use_p): Remove.
(zero_imm_uses_p): Likewise.
* tree-ssa-coalesce.c (create_outofssa_var_map): Use has_single_use
instead of single_imm_use_p.
* tree-cfg.c (replace_uses_by): Use has_zero_use instead of
zero_imm_uses_p.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122036 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-cfg.c
gcc/tree-flow-inline.h
gcc/tree-ssa-coalesce.c

index 6a6886d..1af0a93 100644 (file)
@@ -1,3 +1,12 @@
+2007-02-16  Richard Guenther  <rguenther@suse.de>
+
+       * tree-flow-inline.h (single_imm_use_p): Remove.
+       (zero_imm_uses_p): Likewise.
+       * tree-ssa-coalesce.c (create_outofssa_var_map): Use has_single_use
+       instead of single_imm_use_p.
+       * tree-cfg.c (replace_uses_by): Use has_zero_use instead of
+       zero_imm_uses_p.
+
 2007-02-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        PR other/27843
index 4d6957f..a99f3c7 100644 (file)
@@ -1208,7 +1208,7 @@ replace_uses_by (tree name, tree val)
        }
     }
 
-  gcc_assert (zero_imm_uses_p (name));
+  gcc_assert (has_zero_uses (name));
 
   /* Also update the trees stored in loop structures.  */
   if (current_loops)
index 64be768..8d1072a 100644 (file)
@@ -560,17 +560,6 @@ has_single_use (tree var)
 }
 
 
-/* If VAR has only a single immediate use, return true.  */
-static inline bool
-single_imm_use_p (tree var)
-{
-  ssa_use_operand_t *ptr;
-
-  ptr = &(SSA_NAME_IMM_USE_NODE (var));
-  return (ptr != ptr->next && ptr == ptr->next->next);
-}
-
-
 /* If VAR has only a single immediate use, return true, and set USE_P and STMT
    to the use pointer and stmt of occurrence.  */
 static inline bool
@@ -605,14 +594,6 @@ num_imm_uses (tree var)
   return num;
 }
 
-/* Return true if VAR has no immediate uses.  */
-static inline bool
-zero_imm_uses_p (tree var)
-{
-  ssa_use_operand_t *ptr = &(SSA_NAME_IMM_USE_NODE (var));
-  return (ptr == ptr->next);
-}
-
 /* Return the tree pointer to by USE.  */ 
 static inline tree
 get_use_from_ptr (use_operand_p use)
index 195dcf9..80586bd 100644 (file)
@@ -976,7 +976,7 @@ create_outofssa_var_map (coalesce_list_p cl, bitmap used_in_copy)
                  if ((e->flags & EDGE_ABNORMAL) == 0)
                    {
                      int cost = coalesce_cost_edge (e);
-                     if (cost == 1 && single_imm_use_p (arg))
+                     if (cost == 1 && has_single_use (arg))
                        add_cost_one_coalesce (cl, ver, SSA_NAME_VERSION (arg));
                      else
                        add_coalesce (cl, ver, SSA_NAME_VERSION (arg), cost);