From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 75EE21A05C2 for ; Wed, 12 Aug 2015 08:18:27 +1000 (AEST) Date: Tue, 11 Aug 2015 17:18:05 -0500 From: Segher Boessenkool To: Anton Blanchard Cc: Michael Gschwind , Alan Modra , Bill Schmidt , Ulrich Weigand , paulus@samba.org, linuxppc-dev@lists.ozlabs.org Subject: Re: RFC: Reducing the number of non volatile GPRs in the ppc64 kernel Message-ID: <20150811221805.GD4711@gate.crashing.org> References: <20150805140300.218ef661@kryten> <20150805041928.GA32178@gate.crashing.org> <20150810145228.3f78c8e4@kryten> <20150811200829.GC4711@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20150811200829.GC4711@gate.crashing.org> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Aug 11, 2015 at 03:08:29PM -0500, Segher Boessenkool wrote: > [snip code] > > After the prologue there are 46 insns executed before the epilogue. > Many of those are conditional branches (that are not executed); it is > all fall-through until it jumps to the "tail" (the few insns before > the epilogue). GCC knows how to duplicate a tail so that it can do > shrink-wrapping (the original tail needs to be followed by an epilogue, > the duplicated one does not want one); but it can only do it in very > simple cases (one basic block or at least no control flow), and that > is not the case here. We need to handle more generic tails. And never mind the elephant in the room: the "fastpath" instructions already use a few non-volatile registers, and the shrink-wrap pass (which runs after register allocation) cannot fix that. Ugh. > This seems related to (if not the same as!) . This has that same problem, too. Segher