This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: module level flags


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]