summaryrefslogtreecommitdiffstats
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2006-05-29 13:47:00 +0000
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>2006-05-29 13:47:00 +0000
commitd470ecbdb45fd3daa00e5d7eddbd74c80eaf7dbe (patch)
tree3034b741e0871fd9fe68745e08331b7ac25d6e62 /gcc/tree-ssa-alias.c
parentd5744dca5598a429a498f7179841c5ad72e5b31a (diff)
downloadppe42-gcc-d470ecbdb45fd3daa00e5d7eddbd74c80eaf7dbe.tar.gz
ppe42-gcc-d470ecbdb45fd3daa00e5d7eddbd74c80eaf7dbe.zip
* tree-flow.h: Remove the prototype for add_type_alias.
* tree-ssa-alias.c (add_type_alias): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114197 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 121f645bcd6..2da4e61d1a9 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -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.
OpenPOWER on IntegriCloud