From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: gcc inlining heuristics was Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning Date: Mon, 12 Jan 2009 12:11:07 -0800 (PST) Message-ID: References: <1231676801.25018.150.camel@macbook.infradead.org> <20090111181307.GM26290@one.firstfloor.org> <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> <496BA036.3010101@t-online.de> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: 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 To: Bernd Schmidt Return-path: In-Reply-To: <496BA036.3010101@t-online.de> List-ID: On Mon, 12 Jan 2009, Bernd Schmidt wrote: > > However, if the compiler chooses to put them into the same stack > location, the RTL-based alias analysis will happily conclude (based on > the differing types) that the reads from A and the writes to B can't > possibly conflict, and some passes may end up reordering them. End > result: overlapping lifetimes and overlapping stack slots. Oops. Yes, I came to the same conclusion. Of course, I knew a-priori that the real bug was using type-based alais analysis to make (statically visible) aliasing decisions, but I realize that there are people who never understood things like that. Sadly, some of them worked on gcc. Linus