Linux and aliasing?
Alexandre Oliva
oliva@dcc.unicamp.br
Wed Jun 30 15:43:00 GMT 1999
I had written:
>> It would mean that the resulting pointer may be aliased to anything
>> else, so the compiler shouldn't move it around nor optimize it ``too
>> much''.
On Jun 4, 1999, Joe Buck <jbuck@Synopsys.COM> wrote:
> For this reason, the effect of proposals like this might be similar
> in performance to just saying, if a function contains a cast of a
> pointer that is later dereferenced, apply -fno-strict-aliasing to
> the entire function, or at least a significant chunk of it.
The main difference is that the notation I propose could be used in
macros. It is true that it could have a glocal effect on the
optimization of any function that uses it, but the requirement
statement would be closely linked to its use, which is good, so that
you wouldn't have to maintain special Makefile rules because such and
such files haven't been `union'ized (yet?) to make them
ANSI-aliasing-safe.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
More information about the Gcc
mailing list