Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2005 13:11:20 +0100
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Jacques Fourie <jf@trispen.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: kernel vm question
Message-ID:  <xzppszpzrbr.fsf@dwp.des.no>
In-Reply-To: <xzpsm4l281b.fsf@dwp.des.no> (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav's?= message of "Fri, 28 Jan 2005 10:54:24 %2B0100")
References:  <41F90140.3020705@trispen.com> <20050127160914.GA72454@VARK.MIT.EDU> <xzpsm4l281b.fsf@dwp.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
des@des.no (Dag-Erling Sm=F8rgrav) writes:
> David Schultz <das@FreeBSD.ORG> writes:
> > When the line is there, the compiler is probably smart enough to
> > realize that 'x=3Dy; y=3Dx' is (usually) a no-op, so it optimizes away
> > both statements.
> Wrong.  The compiler is free to optimize away the second statement
> provided that neither x nor y is declared volatile, but it cannot
> optimize away the first statement.

I should add: unless it can determine with absolute certainty that x
is not referenced later.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzppszpzrbr.fsf>