freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pooma-dev] Re: InlineEvaluator implementation question


From: Mark Mitchell
Subject: Re: [pooma-dev] Re: InlineEvaluator implementation question
Date: Mon, 16 Dec 2002 11:42:17 -0800


Hmm - as both, lhs and rhs are declared const, isnt this enough to tell
the compiler? Or has the compiler to assume every function call can have
a side-effect on any (but local) variable?

This is the classic "pointer aliasing" problem for compilers; the
modifications to lhs (via the write operatin in the loop) might,
from the compiler's point of view, change the rhs.  The copies allow
a good compiler to tell that this cannot happen.

Well, at least gcc creates worse (larger) code with copying than without.

Yes; GCC has a ways to go in this regard.

--
Mark Mitchell                address@hidden
CodeSourcery, LLC            http://www.codesourcery.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]