Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756814AbZALT1I (ORCPT ); Mon, 12 Jan 2009 14:27:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754731AbZALT0t (ORCPT ); Mon, 12 Jan 2009 14:26:49 -0500 Received: from terminus.zytor.com ([198.137.202.10]:43183 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753395AbZALT0s (ORCPT ); Mon, 12 Jan 2009 14:26:48 -0500 Message-ID: <496B9890.1090002@zytor.com> Date: Mon, 12 Jan 2009 11:22:56 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.18 (X11/20081119) MIME-Version: 1.0 To: Andi Kleen CC: Linus Torvalds , Bernd Schmidt , David Woodhouse , Andrew Morton , Ingo Molnar , Harvey Harrison , 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 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> <20090112193201.GA23848@one.firstfloor.org> In-Reply-To: <20090112193201.GA23848@one.firstfloor.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1097 Lines: 33 Andi Kleen wrote: > 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. For this to be convolved with aliasing *AT ALL* indicates this is done incorrectly. This is about storage allocation, not aliases. Storage allocation only depends on lifetime. -hpa -- 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/