[PATCH] Fix PR38503, re-implement no-tbaa (placement-new, GIMPLE_CHANGE_DYNAMIC_TYPE)

Diego Novillo dnovillo@google.com
Sat Jan 24 20:51:00 GMT 2009


On Sat, Jan 24, 2009 at 14:22, Richard Guenther <rguenther@suse.de> wrote:

> +       /* If the reference is based on a decl and that is marked such
> +          that type-based aliasing does not apply return alias set zero.  */
> +       else if (DECL_P (inner)
> +              && !MTAG_P (inner)
> +              && DECL_NO_TBAA_P (inner))
[ ... ]
> --- 2955,2963 ----
>    if (mem_alias_set == 0
>        || DECL_POINTER_ALIAS_SET (ptr) == 0
>        || TYPE_REF_CAN_ALIAS_ALL (TREE_TYPE (ptr))
> !       || (DECL_P (var)
> !         && !MTAG_P (var)
> !         && DECL_NO_TBAA_P (var)))

Maybe factor this into an inline predicate or macro?

The rest looks fine to me.  Certainly cleaner than what we had before.


Diego.



More information about the Gcc-patches mailing list