This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: MEM_COPY_ATTRIBUTES
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Subject: Re: MEM_COPY_ATTRIBUTES
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 03 May 2000 12:38:59 -0700
- Cc: gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <10005031917.AA28376@vlsi1.ultra.nyu.edu>
>>>>> "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