This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Proposed resolution to aliasing issue.
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Wed, 11 May 2005 18:22:24 -0400 (EDT)
- Subject: Re: Proposed resolution to aliasing issue.
- References: <428251FD.7030702@codesourcery.com>
Our proposed approach is to -- by default -- assume that "g" may access all
of "b". However, in the event that the corresponding parameter to "g" has an
attribute (name TBD, possibly the same as the one that appears in Danny's
recent patch), then we may assume that "g" (and its callees) do not use the
pointer to obtain access to any fields of "b".
[ I did not discuss this with Kenny, but another option is to have a
-fassume-X switch, off by default, which treats your code as if you had the
magic attribute everywhere. ]
I have no problem with this resolution, but as i previously explained, it
does require the patch i submitted (which actually removes the code
entirely for the moment) be applied, unless you are going to go the flag
route.
If you are doing it just by attribute, the code to handle this the above
way needs to be reinserted somewhere else when we can use it (IE without
redoing call clobbering a little bit, it's not useful).