[PATCH][alias-improvements] More type-based disambiguation

Daniel Berlin dberlin@dberlin.org
Sat Jan 17 17:43:00 GMT 2009


On Sat, Jan 17, 2009 at 11:00 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> This fixes type-based disambiguation to also consider canonical types
> and eventual structual comparisons.  I believe this allows us to enable
> a positive fallback for disjunct access paths.  It fixes the long-standing
> PR13146 and a deficiency compared to RTL alias analysis (PR38895), but
> without the cost of a quadratic loop.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to the
> branch.
>
> Richard.

> Index: gcc/tree-ssa-alias.c
> ===================================================================
> *** gcc/tree-ssa-alias.c.orig   2009-01-17 16:50:25.000000000 +0100
> --- gcc/tree-ssa-alias.c        2009-01-17 16:50:58.000000000 +0100
> *************** debug_points_to_info_for (tree var)
> *** 357,362 ****
> --- 357,380 ----
>    dump_points_to_info_for (stderr, var);
>  }
>
> + /* Return 1 if TYPE1 and TYPE2 are to be considered equivalent for the
> +    purpose of TBAA.  Return 0 if they are distinct and -1 if we cannot
> +    decide.  */

For multi-valued functions like this, it would be nice to either
return an enum, or at least, #define the results to names that have
some meaning.
It makes it much easier to understand later (and when the function
inveitably gets exported and used all over the codebase ;P)



More information about the Gcc-patches mailing list