Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760324AbZALXC3 (ORCPT ); Mon, 12 Jan 2009 18:02:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755567AbZALXCN (ORCPT ); Mon, 12 Jan 2009 18:02:13 -0500 Received: from mail2.shareable.org ([80.68.89.115]:49231 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753953AbZALXCL (ORCPT ); Mon, 12 Jan 2009 18:02:11 -0500 Date: Mon, 12 Jan 2009 23:01:17 +0000 From: Jamie Lokier To: Linus Torvalds Cc: "H. Peter Anvin" , Andi Kleen , 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 Message-ID: <20090112230117.GC26430@shareable.org> References: <20090112001255.GR26290@one.firstfloor.org> <20090112005228.GS26290@one.firstfloor.org> <496B86B5.3090707@t-online.de> <20090112193201.GA23848@one.firstfloor.org> <496B9890.1090002@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1079 Lines: 25 Linus Torvalds wrote: > > This is about storage allocation, not aliases. Storage allocation only > > depends on lifetime. > > Well, the thing is, code motion does extend life-times, and if you think > you can move stores across each other (even when you can see that they > alias statically) due to type-based alias decisions, that does essentially > end up making what _used_ to be disjoint lifetimes now be potentially > overlapping. Sometimes code motion makes code faster and/or smaller but use more stack space. If you want to keep the stack use down, it blocks some other optimisations. Register allocation is similar: code motion optimisations may use more registers due to overlapping lifetimes, which causes more register spills and changes the code. The two interact; it's not trivial to optimise fully. -- Jamie -- 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/