This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove special-casing of PTR_IS_REF_ALL pointers from alias analysis


>  T *p = &a;
>  p->b = x;
> 
> which is valid, the used alias set is _always_ that of the base object
> *p, which is the structures alias set, for the purpose of conflict
> decision.

Well, I can't speak for the tree-level aliasing, but at the RTL level,
the alias set for p->b is that of the type of "b" normally and of *p
if DECL_NONADDRESSABLE_P.

>  2) Why we need to record the parents alias set at all.  To cite
>     tree.h:
> 
> struct tree_struct_field_tag GTY(())
> {
> ...
>   /* Alias set for a DECL_NONADDRESSABLE_P field.  Otherwise -1.  */
>   alias_set_type alias_set;
> };

I have no idea what that is.

> But as said, it is up to the frontends to avoid addressing non-addressable
> things.

Of course!  But knowing that's going to happen is very useful
information for aliasing analysis.  Perhaps you're saying that there's no
way for the tree level analysis to use that information, but there
*certainly* is a way for the RTL level to do and it always has.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]