Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756194AbZALTRv (ORCPT ); Mon, 12 Jan 2009 14:17:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753845AbZALTRj (ORCPT ); Mon, 12 Jan 2009 14:17:39 -0500 Received: from one.firstfloor.org ([213.235.205.2]:52447 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752620AbZALTRi (ORCPT ); Mon, 12 Jan 2009 14:17:38 -0500 Date: Mon, 12 Jan 2009 20:32:01 +0100 From: Andi Kleen To: Linus Torvalds Cc: Bernd Schmidt , Andi Kleen , David Woodhouse , Andrew Morton , Ingo Molnar , Harvey Harrison , "H. Peter Anvin" , Chris Mason , Peter Zijlstra , Steven Rostedt , paulmck@linux.vnet.ibm.com, Gregory Haskins , Matthew Wilcox , Linux Kernel Mailing List , linux-fsdevel , linux-btrfs , Thomas Gleixner , Nick Piggin , Peter Morreale , Sven Dietrich , jh@suse.cz Subject: Re: gcc inlining heuristics was Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning Message-ID: <20090112193201.GA23848@one.firstfloor.org> References: <20090111201427.GP26290@one.firstfloor.org> <1231704939.25018.548.camel@macbook.infradead.org> <20090111203441.GQ26290@one.firstfloor.org> <20090112001255.GR26290@one.firstfloor.org> <20090112005228.GS26290@one.firstfloor.org> <496B86B5.3090707@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 938 Lines: 28 On Mon, Jan 12, 2009 at 11:02:17AM -0800, Linus Torvalds wrote: > > Something at the back of my mind said "aliasing". > > > > $ gcc linus.c -O2 -S ; grep subl linus.s > > subl $1624, %esp > > $ gcc linus.c -O2 -S -fno-strict-aliasing; grep subl linus.s > > subl $824, %esp > > > > That's with 4.3.2. > > Interesting. > > Nonsensical, but interesting. What I find nonsensical is that -fno-strict-aliasing generates better code here. Normally one would expect the compiler seeing more aliases with that option and then be more conservative regarding any sharing. But it seems to be the other way round here. -Andi -- ak@linux.intel.com -- Speaking for myself only. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/