This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: MEM_COPY_ATTRIBUTES
- To: mark at codesourcery dot com
- Subject: Re: MEM_COPY_ATTRIBUTES
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Wed, 3 May 00 15:47:39 EDT
- Cc: gcc at gcc dot gnu dot org
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.