Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760100AbZAUB1X (ORCPT ); Tue, 20 Jan 2009 20:27:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755682AbZAUB1G (ORCPT ); Tue, 20 Jan 2009 20:27:06 -0500 Received: from terminus.zytor.com ([198.137.202.10]:56956 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755508AbZAUB1D (ORCPT ); Tue, 20 Jan 2009 20:27:03 -0500 Message-ID: <497678CC.5060703@zytor.com> Date: Tue, 20 Jan 2009 17:22:20 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Ingo Molnar CC: Linus Torvalds , David Woodhouse , Nick Piggin , Bernd Schmidt , Andi Kleen , Andrew Morton , 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 , Peter Morreale , Sven Dietrich , jh@suse.cz Subject: Re: gcc inlining heuristics was Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning References: <496BBE27.2020206@t-online.de> <20090119001345.GA9880@elte.hu> <20090119062212.GC22584@wotan.suse.de> <20090120005124.GD16304@wotan.suse.de> <20090120123824.GD7790@elte.hu> <1232480940.22233.1435.camel@macbook.infradead.org> <20090120210515.GC19710@elte.hu> <20090120220516.GA10483@elte.hu> In-Reply-To: <20090120220516.GA10483@elte.hu> 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: 980 Lines: 24 Ingo Molnar wrote: > > Hm, GCC uses __restrict__, right? > > I'm wondering whether there's any internal tie-up between alias analysis > and the __restrict__ keyword - so if we turn off aliasing optimizations > the __restrict__ keyword's optimizations are turned off as well. > Actually I suspect that "restrict" makes little difference for inlines or even statics, since gcc generally can do alias analysis fine there. However, in the presence of an intermodule function call, all alias analysis is off. This is presumably why type-based analysis is used at all ... to at least be able to a modicum of, say, loop invariant removal in the presence of a library call. This is also where "restrict" comes into play. -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/