This is the mail archive of the gcc@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: [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.


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