]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2012-05-11 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 May 2012 14:08:30 +0000 (14:08 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 May 2012 14:08:30 +0000 (14:08 +0000)
* tree-flow.h (referenced_var_check_and_insert): Remove.
(find_new_referenced_vars): Likewise.
* tree-dfa.c (referenced_var_check_and_insert): Make static.
(find_new_referenced_vars_1, find_new_referenced_vars): Remove.
* tree-inline.c (copy_bb): Use find_referenced_vars_in
instead of find_new_referenced_vars.
* gimple-fold.c (gimplify_and_update_call_from_tree): Likewise.

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

gcc/ChangeLog
gcc/gimple-fold.c
gcc/tree-dfa.c
gcc/tree-flow.h
gcc/tree-inline.c

index a71420c70d3d875cf656e7ced525ca41db14fa21..7da054fad53fa7f9058970949fb71913e53e091c 100644 (file)
@@ -1,3 +1,13 @@
+2012-05-11  Richard Guenther  <rguenther@suse.de>
+
+       * tree-flow.h (referenced_var_check_and_insert): Remove.
+       (find_new_referenced_vars): Likewise.
+       * tree-dfa.c (referenced_var_check_and_insert): Make static.
+       (find_new_referenced_vars_1, find_new_referenced_vars): Remove.
+       * tree-inline.c (copy_bb): Use find_referenced_vars_in
+       instead of find_new_referenced_vars.
+       * gimple-fold.c (gimplify_and_update_call_from_tree): Likewise.
+
 2012-05-11  Richard Guenther  <rguenther@suse.de>
 
        * tree-pass.h (pass_rest_of_compilation,
index 55e7344043c19760dc3454d8c54cede82abefb4d..ee8b4d14d7c212802e009492df88fbf08deca343 100644 (file)
@@ -625,7 +625,7 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
       new_stmt = gsi_stmt (i);
       /* The replacement can expose previously unreferenced variables.  */
       if (gimple_in_ssa_p (cfun))
-       find_new_referenced_vars (new_stmt);
+       find_referenced_vars_in (new_stmt);
       /* If the new statement possibly has a VUSE, update it with exact SSA
         name we know will reach this one.  */
       if (gimple_has_mem_ops (new_stmt))
index 3494fc9e962097512dec6d77cd61371d1f5352fe..3b60ba12a6a11c8e2b37fb6d7d7593e3b4ce2c97 100644 (file)
@@ -462,9 +462,7 @@ find_vars_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
   return NULL_TREE;
 }
 
-/* Find referenced variables in STMT.  In contrast with
-   find_new_referenced_vars, this function will not mark newly found
-   variables for renaming.  */
+/* Find referenced variables in STMT.  */
 
 void
 find_referenced_vars_in (gimple stmt)
@@ -505,7 +503,7 @@ referenced_var_lookup (struct function *fn, unsigned int uid)
 /* Check if TO is in the referenced_vars hash table and insert it if not.
    Return true if it required insertion.  */
 
-bool
+static bool
 referenced_var_check_and_insert (tree to)
 {
   tree h, *loc;
@@ -667,38 +665,6 @@ mark_symbols_for_renaming (gimple stmt)
 }
 
 
-/* Find all variables within the gimplified statement that were not
-   previously visible to the function and add them to the referenced
-   variables list.  */
-
-static tree
-find_new_referenced_vars_1 (tree *tp, int *walk_subtrees,
-                           void *data ATTRIBUTE_UNUSED)
-{
-  tree t = *tp;
-
-  if (TREE_CODE (t) == VAR_DECL && !var_ann (t))
-    {
-      add_referenced_var (t);
-      mark_sym_for_renaming (t);
-    }
-
-  if (IS_TYPE_OR_DECL_P (t))
-    *walk_subtrees = 0;
-
-  return NULL;
-}
-
-
-/* Find any new referenced variables in STMT.  */
-
-void
-find_new_referenced_vars (gimple stmt)
-{
-  walk_gimple_op (stmt, find_new_referenced_vars_1, NULL);
-}
-
-
 /* If EXP is a handled component reference for a structure, return the
    base variable.  The access range is delimited by bit positions *POFFSET and
    *POFFSET + *PMAX_SIZE.  The access size is *PSIZE bits.  If either
index bda4ba9ce7775a857ef5124c802263d583f120fa..2846b67a01584d8c58fb7ecf913a8c7e18d5a1a9 100644 (file)
@@ -332,7 +332,6 @@ typedef struct
        (VAR) = next_referenced_var (&(ITER)))
 
 extern tree referenced_var_lookup (struct function *, unsigned int);
-extern bool referenced_var_check_and_insert (tree);
 #define num_referenced_vars htab_elements (gimple_referenced_vars (cfun))
 
 #define num_ssa_names (VEC_length (tree, cfun->gimple_df->ssa_names))
@@ -496,7 +495,6 @@ extern tree get_virtual_var (tree);
 extern bool add_referenced_var (tree);
 extern void remove_referenced_var (tree);
 extern void mark_symbols_for_renaming (gimple);
-extern void find_new_referenced_vars (gimple);
 extern tree make_rename_temp (tree, const char *);
 extern void set_default_def (tree, tree);
 extern tree gimple_default_def (struct function *, tree);
index 057087e62a6a838055bf883be2f6ab611d7494ef..c9aaeeeda3afb611fc353a974c4daf2af68c8394 100644 (file)
@@ -1794,7 +1794,7 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
              ssa_op_iter i;
              tree def;
 
-             find_new_referenced_vars (gsi_stmt (copy_gsi));
+             find_referenced_vars_in (gsi_stmt (copy_gsi));
              FOR_EACH_SSA_TREE_OPERAND (def, stmt, i, SSA_OP_DEF)
                if (TREE_CODE (def) == SSA_NAME)
                  SSA_NAME_DEF_STMT (def) = stmt;