aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2004-09-10 16:52:45 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2004-09-10 12:52:45 -0400
commite30b0ae2fa5e74b14017fe2af9b7f7743281fe37 (patch)
treec79455968b776cc092ef673fed66add305c49749 /gcc/tree-ssa-alias.c
parent89dbed81f485455d27b9822c1de921571580fe65 (diff)
downloadgcc-e30b0ae2fa5e74b14017fe2af9b7f7743281fe37.zip
gcc-e30b0ae2fa5e74b14017fe2af9b7f7743281fe37.tar.gz
gcc-e30b0ae2fa5e74b14017fe2af9b7f7743281fe37.tar.bz2
Revert
2004-09-08 Jie Zhang <zhangjie@magima.com.cn> * tree-ssa-alias.c (compute_flow_insensitive_aliasing): If type memory tag is call clobbered, so are its aliases. (group_aliases): When two memory tags being grouped, if one is call clobbered, so are the other and its aliases. (add_may_alias): Remove call-clobbering stuff. (replace_may_alias): Likewise. (merge_pointed_to_info): Merge pt_global_mem From-SVN: r87306
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c47
1 files changed, 20 insertions, 27 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index f00fcc1..cd41fba 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -924,10 +924,6 @@ compute_flow_insensitive_aliasing (struct alias_info *ai)
num_tag_refs = VARRAY_UINT (ai->num_references, tag_ann->uid);
num_var_refs = VARRAY_UINT (ai->num_references, v_ann->uid);
- /* If TAG is call clobbered, so is VAR. */
- if (is_call_clobbered (tag))
- mark_call_clobbered (var);
-
/* Add VAR to TAG's may-aliases set. */
add_may_alias (tag, var);
@@ -1120,29 +1116,8 @@ group_aliases (struct alias_info *ai)
sbitmap_a_and_b (res, tag1_aliases, tag2_aliases);
if (sbitmap_first_set_bit (res) >= 0)
{
- size_t k;
-
tree tag2 = var_ann (ai->pointers[j]->var)->type_mem_tag;
- if (!is_call_clobbered (tag1) && is_call_clobbered (tag2))
- {
- mark_call_clobbered (tag1);
- EXECUTE_IF_SET_IN_SBITMAP (tag1_aliases, 0, k,
- {
- tree var = referenced_var (k);
- mark_call_clobbered (var);
- });
- }
- else if (is_call_clobbered (tag1) && !is_call_clobbered (tag2))
- {
- mark_call_clobbered (tag2);
- EXECUTE_IF_SET_IN_SBITMAP (tag2_aliases, 0, k,
- {
- tree var = referenced_var (k);
- mark_call_clobbered (var);
- });
- }
-
sbitmap_a_or_b (tag1_aliases, tag1_aliases, tag2_aliases);
/* TAG2 does not need its aliases anymore. */
@@ -1639,6 +1614,16 @@ add_may_alias (tree var, tree alias)
if (alias == VARRAY_TREE (v_ann->may_aliases, i))
return;
+ /* If VAR is a call-clobbered variable, so is its new ALIAS.
+ FIXME, call-clobbering should only depend on whether an address
+ escapes. It should be independent of aliasing. */
+ if (is_call_clobbered (var))
+ mark_call_clobbered (alias);
+
+ /* Likewise. If ALIAS is call-clobbered, so is VAR. */
+ else if (is_call_clobbered (alias))
+ mark_call_clobbered (var);
+
VARRAY_PUSH_TREE (v_ann->may_aliases, alias);
a_ann->is_alias_tag = 1;
}
@@ -1651,6 +1636,16 @@ replace_may_alias (tree var, size_t i, tree new_alias)
{
var_ann_t v_ann = var_ann (var);
VARRAY_TREE (v_ann->may_aliases, i) = new_alias;
+
+ /* If VAR is a call-clobbered variable, so is NEW_ALIAS.
+ FIXME, call-clobbering should only depend on whether an address
+ escapes. It should be independent of aliasing. */
+ if (is_call_clobbered (var))
+ mark_call_clobbered (new_alias);
+
+ /* Likewise. If NEW_ALIAS is call-clobbered, so is VAR. */
+ else if (is_call_clobbered (new_alias))
+ mark_call_clobbered (var);
}
@@ -1707,8 +1702,6 @@ merge_pointed_to_info (struct alias_info *ai, tree dest, tree orig)
if (orig_pi)
{
- dest_pi->pt_global_mem |= orig_pi->pt_global_mem;
-
/* Notice that we never merge PT_MALLOC. This attribute is only
true if the pointer is the result of a malloc() call.
Otherwise, we can end up in this situation: