[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <497678CC.5060703@zytor.com>
Date: Tue, 20 Jan 2009 17:22:20 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Ingo Molnar <mingo@...e.hu>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
David Woodhouse <dwmw2@...radead.org>,
Nick Piggin <npiggin@...e.de>,
Bernd Schmidt <bernds_cb1@...nline.de>,
Andi Kleen <andi@...stfloor.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Harvey Harrison <harvey.harrison@...il.com>,
Chris Mason <chris.mason@...cle.com>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
paulmck@...ux.vnet.ibm.com, Gregory Haskins <ghaskins@...ell.com>,
Matthew Wilcox <matthew@....cx>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-btrfs <linux-btrfs@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Morreale <pmorreale@...ell.com>,
Sven Dietrich <SDietrich@...ell.com>, jh@...e.cz
Subject: Re: gcc inlining heuristics was Re: [PATCH -v7][RFC]: mutex: implement
adaptive spinning
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists