From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 19 Feb 2008 10:28:46 +0100 From: Andi Kleen To: Willy Tarreau Subject: Re: [PATCH 1/3] Fix Unlikely(x) == y Message-ID: <20080219092846.GB6485@one.firstfloor.org> References: <47B70A61.9030306@tiscali.nl> <20080216094226.1e8eede1@laptopd505.fenrus.org> <200802191333.53607.nickpiggin@yahoo.com.au> <20080219055806.GA8404@1wt.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20080219055806.GA8404@1wt.eu> Cc: Nick Piggin , Roel Kluin <12o3l@tiscali.nl>, lkml , linuxppc-dev@ozlabs.org, Andi Kleen , cbe-oss-dev@ozlabs.org, Arjan van de Ven List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > Sometimes, for performance critical paths, I would like gcc to be dumb and > follow *my* code and not its hard-coded probabilities. If you really want that, simple: just disable optimization @) > Maybe one thing we would need would be the ability to assign probabilities > to each branch based on what we expect, so that gcc could build a better > tree keeping most frequently used code tight. Just use profile feedback then for user space. I don't think it's a good idea for kernel code though because it leads to unreproducible binaries which would wreck the development model. > Hmm I've just noticed -fno-guess-branch-probability in the man, I never tried > it. Or -fno-reorder-blocks -Andi