From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Oliva To: Joe Buck Cc: torvalds@transmeta.com, craig@jcb-sc.com, mark@codesourcery.com, davem@redhat.com, chip@perlsupport.com, egcs@egcs.cygnus.com Subject: Re: Linux and aliasing? Date: Wed, 30 Jun 1999 15:43:00 -0000 Message-ID: References: <199906042025.NAA23087@atrus.synopsys.com> X-SW-Source: 1999-06n/msg00180.html Message-ID: <19990630154300.3muCeOXJxBny6Jt0Hm5GKs-0u6lKooI4gLtfKNJ_KFc@z> 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 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