------- Comment #20 from rguenth at gcc dot gnu dot org 2006-08-27 14:20
-------
So I have a patch that produces (diff typedef long GLint
__attribute__((may_alias)) resunts vs. patch):
--- t.i.030t.alias1.ok 2006-08-27 16:13:54.000000000 +0200
+++ t.i.030t.alias1 2006-08-27 16:14:17.000000000 +0200
@@ -174,11 +174,11 @@
Variable: blist, UID 1526, const int *
-Variable: list, UID 1527, int[32], is aliased, is addressable, call clobbered
(, passed to call, is global var ), default def: list_4
+Variable: list, UID 1527, int[32], is addressable, call clobbered (, passed to
call, is incoming pointer ), default def: list_4
Variable: blist.0, UID 1528, const GLint *, symbol memory tag: SMT.30
-Variable: SMT.30, UID 1575, const GLint, is addressable, is global, call
clobbered (, passed to call, is global var ), may aliases: { list }
+Variable: SMT.30, UID 1575, const GLint, is addressable, is global, call
clobbered (, passed to call, is global var )
@@ -195,8 +195,8 @@
Aliased symbols
-list, UID 1527, int[32], is aliased, is addressable, call clobbered (, passed
to call, is global var ), default def: list_4
-SMT.30, UID 1575, const GLint, is addressable, is global, call clobbered (,
passed to call, is global var ), may aliases: { list }
+list, UID 1527, int[32], is addressable, call clobbered (, passed to call, is
incoming pointer ), default def: list_4
+SMT.30, UID 1575, const GLint, is addressable, is global, call clobbered (,
passed to call, is global var )
Dereferenced pointers
@@ -204,7 +204,7 @@
Symbol memory tags
-SMT.30, UID 1575, const GLint, is addressable, is global, call clobbered (,
passed to call, is global var ), may aliases: { list }
+SMT.30, UID 1575, const GLint, is addressable, is global, call clobbered (,
passed to call, is global var )
Flow-sensitive alias information for find
@@ -275,7 +275,8 @@
# blist_1 = PHI <blist_3(3), blist_6(4)>;
<L2>:;
blist.0_7 = (const GLint *) blist_1;
- # list_9 = V_MAY_DEF <list_8>;
+ # list_10 = V_MAY_DEF <list_8>;
+ # SMT.30_11 = V_MAY_DEF <SMT.30_9>;
aglChoosePixelFormat (blist.0_7);
return;
by noticing that if pt_anything is set, we indeed need to include all
addressable vars in the clobbering:
Index: tree-ssa-alias.c
===================================================================
*** tree-ssa-alias.c (revision 116488)
--- tree-ssa-alias.c (working copy)
*************** set_initial_properties (struct alias_inf
*** 359,364 ****
--- 359,373 ----
if (!unmodifiable_var_p (referenced_var (j)))
mark_call_clobbered (referenced_var (j), pi->escape_mask);
}
+
+ if (pi->pt_anything)
+ {
+ bitmap_iterator bi;
+ unsigned int j;
+ EXECUTE_IF_SET_IN_BITMAP (addressable_vars, 0, j, bi)
+ if (!unmodifiable_var_p (referenced_var (j)))
+ mark_call_clobbered (referenced_var (j), pi->escape_mask);
+ }
}
/* If the name tag is call clobbered, so is the symbol tag
> So what do you think will happen when you add one level of indirection
> to the mess, and TBAA now prunes out *that* alias instead, so you miss
> it again? (IE break the chain of clobber transitivity one link in the
> other direcftion).
Do you have a testcase in mind?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28778