tree-flow.h: Remove the prototype for add_type_alias.
authorKazu Hirata <kazu@codesourcery.com>
Mon, 29 May 2006 13:47:00 +0000 (13:47 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 29 May 2006 13:47:00 +0000 (13:47 +0000)
* tree-flow.h: Remove the prototype for add_type_alias.
* tree-ssa-alias.c (add_type_alias): Remove.

From-SVN: r114197

gcc/ChangeLog
gcc/tree-flow.h
gcc/tree-ssa-alias.c

index 726401b..b74289a 100644 (file)
@@ -5,6 +5,9 @@
 
        * config/bfin/bfin.h (PARM_BOUNDRY, STACK_BOUNDRY): Remove.
 
+       * tree-flow.h: Remove the prototype for add_type_alias.
+       * tree-ssa-alias.c (add_type_alias): Remove.
+
 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
 
        * cfgcleanup.c, cfgexpand.c, cgraphunit.c, config/arm/arm.c,
index 0dad98b..6a953ab 100644 (file)
@@ -667,7 +667,6 @@ extern void debug_points_to_info_for (tree);
 extern bool may_be_aliased (tree);
 extern bool is_aliased_with (tree, tree);
 extern struct ptr_info_def *get_ptr_info (tree);
-extern void add_type_alias (tree, tree);
 extern void new_type_alias (tree, tree);
 extern void count_uses_and_derefs (tree, tree, unsigned *, unsigned *, bool *);
 static inline subvar_t get_subvars_for_var (tree);
index 121f645..2da4e61 100644 (file)
@@ -2687,93 +2687,6 @@ is_aliased_with (tree tag, tree sym)
 }
 
 
-/* Add VAR to the list of may-aliases of PTR's symbol tag.  If PTR
-   doesn't already have a symbol tag, create one.  */
-
-void
-add_type_alias (tree ptr, tree var)
-{
-  VEC(tree, gc) *aliases;
-  tree tag, al;
-  var_ann_t ann = var_ann (ptr);
-  subvar_t svars;
-  VEC (tree, heap) *varvec = NULL;  
-  unsigned i;
-
-  if (ann->symbol_mem_tag == NULL_TREE)
-    {
-      tree q = NULL_TREE;
-      tree tag_type = TREE_TYPE (TREE_TYPE (ptr));
-      HOST_WIDE_INT tag_set = get_alias_set (tag_type);
-      safe_referenced_var_iterator rvi;
-
-      /* PTR doesn't have a symbol tag, create a new one and add VAR to
-        the new tag's alias set.
-
-        FIXME, This is slower than necessary.  We need to determine
-        whether there is another pointer Q with the same alias set as
-        PTR.  This could be sped up by having symbol tags associated
-        with types.  */
-      FOR_EACH_REFERENCED_VAR_SAFE (q, varvec, rvi)
-       {
-         if (POINTER_TYPE_P (TREE_TYPE (q))
-             && tag_set == get_alias_set (TREE_TYPE (TREE_TYPE (q))))
-           {
-             /* Found another pointer Q with the same alias set as
-                the PTR's pointed-to type.  If Q has a symbol tag, use
-                it.  Otherwise, create a new memory tag for PTR.  */
-             var_ann_t ann1 = var_ann (q);
-             if (ann1->symbol_mem_tag)
-               ann->symbol_mem_tag = ann1->symbol_mem_tag;
-             else
-               ann->symbol_mem_tag = create_memory_tag (tag_type, true);
-             goto found_tag;
-           }
-       }
-
-      /* Couldn't find any other pointer with a symbol tag we could use.
-        Create a new memory tag for PTR.  */
-      ann->symbol_mem_tag = create_memory_tag (tag_type, true);
-    }
-
-found_tag:
-  /* If VAR is not already PTR's symbol tag, add it to the may-alias set
-     for PTR's symbol tag.  */
-  gcc_assert (!MTAG_P (var));
-  tag = ann->symbol_mem_tag;
-
-  /* If VAR has subvars, add the subvars to the tag instead of the
-     actual var.  */
-  if (var_can_have_subvars (var)
-      && (svars = get_subvars_for_var (var)))
-    {
-      subvar_t sv;      
-      for (sv = svars; sv; sv = sv->next)
-       add_may_alias (tag, sv->var);
-    }
-  else
-    add_may_alias (tag, var);
-
-  /* TAG and its set of aliases need to be marked for renaming.  */
-  mark_sym_for_renaming (tag);
-  if ((aliases = var_ann (tag)->may_aliases) != NULL)
-    {
-      for (i = 0; VEC_iterate (tree, aliases, i, al); i++)
-       mark_sym_for_renaming (al);
-    }
-
-  /* If we had grouped aliases, VAR may have aliases of its own.  Mark
-     them for renaming as well.  Other statements referencing the
-     aliases of VAR will need to be updated.  */
-  if ((aliases = var_ann (var)->may_aliases) != NULL)
-    {
-      for (i = 0; VEC_iterate (tree, aliases, i, al); i++)
-       mark_sym_for_renaming (al);
-    }
-  VEC_free (tree, heap, varvec);
-}
-
-
 /* Create a new symbol tag for PTR.  Construct the may-alias list of this type
    tag so that it has the aliasing of VAR.