From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 28 12:11:49 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D4DE16A4CE for ; Fri, 28 Jan 2005 12:11:49 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id D820F43D2D for ; Fri, 28 Jan 2005 12:11:48 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 554E8530D; Fri, 28 Jan 2005 13:11:47 +0100 (CET) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 875C15308; Fri, 28 Jan 2005 13:11:20 +0100 (CET) Received: by dwp.des.no (Postfix, from userid 2602) id 47070B869; Fri, 28 Jan 2005 13:11:20 +0100 (CET) To: Jacques Fourie References: <41F90140.3020705@trispen.com> <20050127160914.GA72454@VARK.MIT.EDU> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Fri, 28 Jan 2005 13:11:20 +0100 In-Reply-To: (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav's?= message of "Fri, 28 Jan 2005 10:54:24 +0100") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on flood.des.no X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,FORGED_RCVD_HELO autolearn=disabled version=3.0.1 cc: freebsd-hackers@FreeBSD.ORG Subject: Re: kernel vm question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2005 12:11:49 -0000 des@des.no (Dag-Erling Sm=F8rgrav) writes: > David Schultz 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