This is the mail archive of the
mailing list for the GCC project.
Re: [sa]: Revert partial def stuff, use fake variables instead
> >>In addition to the mainline merge, i've made significant changes to how
> >>struct-aliasing operates.
> >>It now uses fake variables to represent structure fields, instead of
> >>trying to make partial defs and uses work.
> >>This is because it end up being a lot less work, even if there is some
> >>overhead in figuring out the fake variables associated with a given
> >>component ref.
> >>The attached patch is the changes necessary to make this work.
> >>I've disabled ivopts because, as diego discovered, ivopts decides it knows
> >>how to create tags for pointers when it really doesn't, when it should
> >>just be calling the may_alias pass.
> >no it definitely should not. What it should do is to preserve the
> >aliasing information unchanged (ivopts do not change the the memory
> >references at all, they just change the way the addresses of those
> >references are expressed). The fact that this is very hard (or even
> >impossible) to do with the current system of representation of alias
> >analysis results can hardly be considered a problem of ivopts.
> Why can't you simply assign the ptr_info associated with one to
> the other (or memcpy, if they can't be shared), while preserving the
> other flags (addressable, etc)?
> This should work.
this is basically what I do now. The problematic case is if you turn a[i]
into *newiv_1. Then we have to get tags for the newiv_1 pointer, which
is problematic (see the discussion following
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg01897.html for details).
Diego came up with some solution in the end, but I somehow never got to
trying to implement it (basically because he also confirmed that the
current solution should not cause correctness problems at the moment,
and I was flooded by other bugreports).