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]

Re: MEM_COPY_ATTRIBUTES


        Richard> Sure, but when would you do that?  I can't think of any
        Richard> time that such a thing would be done.

    As I recall, it is done in some places.

Well, I just looked at all the places it is used and found only
one: in alpha.c.  I'll make that one explicitly clear MEM_ALIAS_SET:
that seems much better than burdening every other caller.

    If you can do that, great.  The risk here is large: hard-to-find bugs
    in large programs when we are overly optimistic about aliasing,
    constness, etc.

Yes, but remember that being *pessimistic* about readonliness is also
wrong if we don't have it set in a store since that will also cause
misbehavior.  Also, we have to clear it when making a SUBREG into
a MEM and that was the bug in alter_subreg.

So I think the safest is to copy *all* the attributes and then handle
the very few (just the one, so far) cases where that's wrong specially.

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