This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] ignoring type alias conflicts between structures and scalars
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dnovillo at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 25 Nov 04 12:45:46 EST
- Subject: Re: [RFC] ignoring type alias conflicts between structures and scalars
So, what I want to teach the alias analyzer is that given a pointer to
an aggregate type A and a regular variable of a scalar type S, such that
A and S are not type-compatible, then a pointer to 'A' cannot possibly
point to a variable of type 'S'.
So, it boils down to alias_sets_conflict_p being symmetric. We want to
consider 'int * -> struct int_float_s' to alias, but we want to reject
'struct int_float_s * -> int'.
Right. I think it's just a matter of writing a version of
alias_sets_conflict_p with the second block of code that checks children
removed, leaving just the checks for set 0, the same alias set, and the first
being a subset of the second. Then call that routine.
It might be worth checking if other places should be using that new routine.
It looks like the usage in gimplify.c and perhaps tree-data-ref.c should as
well.