Proposed resolution to aliasing issue.
Daniel Berlin
dberlin@dberlin.org
Wed May 11 23:32:00 GMT 2005
> 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).
More information about the Gcc
mailing list