[tree-ssa] More aliasing fixes

Jan Hubicka hubicka@ucw.cz
Wed Dec 17 12:58:00 GMT 2003


> 
> This one has been around for a while.  When selecting memory tags, we
> were wrongly choosing the same memory tag for pointers that could not
> possibly point to the same location.

I see, this makes it more Morgan like.  We still don't have separate tag
for each load, instead we take advantage of the fact that pointers with
same properties will have equivalently looking tags, right?
> 
> In this fragment of code, that Jeff sent me a while ago, we were
> thinking that that references to pointer 'decl' could be aliased with
> pointer 'cond'.  This prevented the elimination of the second if().
> 
> simplify_condition (tree *cond_p)
> {
>   tree decl;
>   tree cond = *cond_p;
>   if (cond->common.code != 42)
>     abort ();
>   decl = cond->list.purpose;
>   if (cond->common.code != 42)
>     abort ();
>   c_simplify_stmt (&decl);
> }
> 
> This same problem was the root of the must-alias promotion problem in
> libstdc++.  The test that was failing (24_iterators/iterator.cc) had
> sufficiently convoluted alias sets that at the time I didn't realize
> that my fix was actually papering over the problem.  Oh, well.

Are you sure that this problem solve the symmetricity issues?
I can not see how these thins are closely related, but perhaps it would
be interesting excercise to try to construct testcase for it.

I've been considering the idea of making the whole thing more Morgan
like - ie making may_alias arrays transitive and always emit one VUSE
for loads (currently we VUSE all aliased tags, right?).  Do you see some
fundamental problem with this idea?

Honza



More information about the Gcc-patches mailing list