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" == Richard Kenner <kenner@vlsi1.ultra.nyu.edu> writes:

    Richard>     Reasonable argument.  But, volatility is a
    Richard> conservative choice; readonly-ness is an optimistic
    Richard> choice.

    Richard> But the structure and scalar attributes that are moved
    Richard> are also an optimistic choice.

True.

    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.

The bottom line is that MEM_COPY_ATTRIBUTES copies that attributes
that were copied before in all the places it was used.  If you want to
extend that list, that's fine -- but you should a) be convinced that's
the right thing to do in all the places MEM_COPY_ATTRIBUTES is used,
and b) persuade yourself that there's no reason ever to copy the
current set without the additional attributes.

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.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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