This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: module level flags
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Bruce Korb <bkorb at pacbell dot net>
- Cc: Robert Dewar <dewar at gnat dot com>, zack at codesourcery dot com, gcc at gcc dot gnu dot org
- Date: 01 Oct 2002 00:04:16 -0300
- Subject: Re: module level flags
- Organization: GCC Team, Red Hat
- References: <20020929094132.3E262F2D68@nile.gnat.com><3D972FFC.641F4F46@pacbell.net>
On Sep 29, 2002, Bruce Korb <bkorb@pacbell.net> wrote:
> In this case, the issue is that the aliasing analysis is incomplete.
> If a routine contains explicit code to cast the address of an object
> of type 'a' to pointers to type b, then in the context of that
> routine it is reasonable to presume a '*b' can refer an object 'a'.
> They are equivalent.
Now what if you factor the code that uses *b into a separate function?
All of a sudden, the code stops working because within that separate
function it is not known that *b may alias an object of type stumble?
Now you try to fix this, and you end up either giving up any possible
optimization that the aliasing rules were designed to offer, or
something that is not uniformly consistent, or you choose the behavior
that may seem wrong if you don't take the aliasing rules into account.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer