Re: Revert PowerPC shrink-wrap support 3 of 3

2015-04-08 Thread Gerald Pfeifer
On Thu, 10 Nov 2011, Hans-Peter Nilsson wrote: I think I need someone with appropriate write privileges to agree with that, and to also give 48h for someone to fix the problem. Sorry for not forthcoming on the second point. brgds, H-P PS. where is the policy written down, besides the

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-15 Thread Richard Henderson
On 11/14/2011 11:56 AM, Alan Modra wrote: * function.c (thread_prologue_and_epilogue_insns): Guard emitting return with single_succ_p test. Ok. r~

CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread Hans-Peter Nilsson
From: Bernd Schmidt ber...@codesourcery.com Date: Mon, 14 Nov 2011 10:51:56 +0100 On 11/11/11 20:13, Hans-Peter Nilsson wrote: AFAICT, your patch has got sufficiently testing now (on three targets to boot) to be considered safe to check in. Or is something amiss? (If it's the

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread Ramana Radhakrishnan
Someone with approval rights: pretty please? Can I add my +1 pretty please as well here :) ? According to #c3 this fixes arm-linux-gnueabi cross-builds for C++ as well and potentially allows this to bootstrap again. I have kicked off a bootstrap and test run on arm-linux-gnueabi . cheers

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread Rainer Orth
Ramana Radhakrishnan ramana.radhakrish...@linaro.org writes: Someone with approval rights: pretty please? Can I add my +1 pretty please as well here :) ? According to #c3 this fixes arm-linux-gnueabi cross-builds for C++ as well and potentially allows this to bootstrap again. I have kicked

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread Richard Henderson
On 11/14/2011 04:10 AM, Hans-Peter Nilsson wrote: Looks like all we need is a positive review of http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01409.html and a ChangeLog entry to unbreak three or more targets. Someone with approval rights: pretty please? That patch is ok. r~

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread Alan Modra
On Mon, Nov 14, 2011 at 07:48:03AM -1000, Richard Henderson wrote: On 11/14/2011 04:10 AM, Hans-Peter Nilsson wrote: Looks like all we need is a positive review of http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01409.html and a ChangeLog entry to unbreak three or more targets. Someone

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread Hans-Peter Nilsson
From: Richard Henderson r...@redhat.com Date: Mon, 14 Nov 2011 18:48:03 +0100 On 11/14/2011 04:10 AM, Hans-Peter Nilsson wrote: Looks like all we need is a positive review of http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01409.html and a ChangeLog entry to unbreak three or more targets.

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread Richard Henderson
On 11/14/2011 11:56 AM, Alan Modra wrote: On Mon, Nov 14, 2011 at 07:48:03AM -1000, Richard Henderson wrote: On 11/14/2011 04:10 AM, Hans-Peter Nilsson wrote: Looks like all we need is a positive review of http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01409.html and a ChangeLog entry to

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread Bernd Schmidt
On 11/15/11 01:43, Richard Henderson wrote: On 11/14/2011 11:56 AM, Alan Modra wrote: * function.c (thread_prologue_and_epilogue_insns): Guard emitting return with single_succ_p test. Hmm. This looks plausible too. Bernd's patch made sure that cfglayout didn't do something

Re: CFG review needed for fix of PowerPC shrink-wrap support 3 of 3

2011-11-14 Thread David Miller
From: Bernd Schmidt ber...@codesourcery.com Date: Tue, 15 Nov 2011 01:54:34 +0100 On 11/15/11 01:43, Richard Henderson wrote: On 11/14/2011 11:56 AM, Alan Modra wrote: * function.c (thread_prologue_and_epilogue_insns): Guard emitting return with single_succ_p test. Hmm. This looks

Re: Revert PowerPC shrink-wrap support 3 of 3

2011-11-11 Thread Hans-Peter Nilsson
From: Hans-Peter Nilsson h...@axis.com Date: Thu, 10 Nov 2011 18:52:39 +0100 From: Hans-Peter Nilsson h...@axis.com Date: Thu, 10 Nov 2011 15:12:54 +0100 From: Bernd Schmidt ber...@codesourcery.com Date: Thu, 10 Nov 2011 14:29:04 +0100 HP, can you run full tests?

Revert PowerPC shrink-wrap support 3 of 3

2011-11-10 Thread Hans-Peter Nilsson
From: Hans-Peter Nilsson h...@axis.com Date: Wed, 9 Nov 2011 09:55:59 +0100 From: Alan Modra amo...@gmail.com Date: Tue, 1 Nov 2011 16:33:40 +0100 On Tue, Nov 01, 2011 at 12:57:22AM +1030, Alan Modra wrote: * function.c (bb_active_p): Delete.

Re: Revert PowerPC shrink-wrap support 3 of 3

2011-11-10 Thread Richard Guenther
On Thu, Nov 10, 2011 at 11:38 AM, Hans-Peter Nilsson hans-peter.nils...@axis.com wrote: From: Hans-Peter Nilsson h...@axis.com Date: Wed, 9 Nov 2011 09:55:59 +0100 From: Alan Modra amo...@gmail.com Date: Tue, 1 Nov 2011 16:33:40 +0100 On Tue, Nov 01, 2011 at 12:57:22AM +1030, Alan Modra

Re: Revert PowerPC shrink-wrap support 3 of 3

2011-11-10 Thread Hans-Peter Nilsson
From: Richard Guenther richard.guent...@gmail.com Date: Thu, 10 Nov 2011 12:22:56 +0100 On Thu, Nov 10, 2011 at 11:38 AM, Hans-Peter Nilsson hans-peter.nils...@axis.com wrote: From: Hans-Peter Nilsson h...@axis.com Date: Wed, 9 Nov 2011 09:55:59 +0100 From: Alan Modra

Re: Revert PowerPC shrink-wrap support 3 of 3

2011-11-10 Thread Richard Guenther
On Thu, Nov 10, 2011 at 12:43 PM, Hans-Peter Nilsson hans-peter.nils...@axis.com wrote: From: Richard Guenther richard.guent...@gmail.com Date: Thu, 10 Nov 2011 12:22:56 +0100 On Thu, Nov 10, 2011 at 11:38 AM, Hans-Peter Nilsson hans-peter.nils...@axis.com wrote: From: Hans-Peter Nilsson

Re: Revert PowerPC shrink-wrap support 3 of 3

2011-11-10 Thread Bernd Schmidt
On 11/10/11 13:14, Richard Guenther wrote: Fair enough. You can count me as one then, and I'll defer to Bernd to either provide a fix or ack the revert. I'm trying to track it down. In 189r.outof_cfglayout, we have (insn 31 33 35 3 (use (reg/i:SI 0 r0))

Re: Revert PowerPC shrink-wrap support 3 of 3

2011-11-10 Thread Hans-Peter Nilsson
From: Hans-Peter Nilsson h...@axis.com Date: Thu, 10 Nov 2011 15:12:54 +0100 From: Bernd Schmidt ber...@codesourcery.com Date: Thu, 10 Nov 2011 14:29:04 +0100 HP, can you run full tests? Cross-test to cris-elf in progress. Thanks! Works, no regressions compared to before the

Re: Revert PowerPC shrink-wrap support 3 of 3

2011-11-10 Thread Michael Meissner
On Thu, Nov 10, 2011 at 02:29:04PM +0100, Bernd Schmidt wrote: On 11/10/11 13:14, Richard Guenther wrote: Fair enough. You can count me as one then, and I'll defer to Bernd to either provide a fix or ack the revert. I'm trying to track it down. In 189r.outof_cfglayout, we have (insn

Re: PowerPC shrink-wrap support 3 of 3

2011-11-07 Thread Jakub Jelinek
On Wed, Nov 02, 2011 at 02:03:40AM +1030, Alan Modra wrote: Bootstrapped and regression tested powerpc-linux. OK to apply? (And I won't be posting any more versions of the patch until this is reviewed. Please excuse me for spamming the list.) Looks reasonable to me, appart from *

Re: PowerPC shrink-wrap support 3 of 3

2011-11-01 Thread Alan Modra
On Tue, Nov 01, 2011 at 12:57:22AM +1030, Alan Modra wrote: Bits left to do - limit size of duplicated tails Done here. Also fixes a hole in that I took no notice of targetm.cannot_copy_insn_p when duplicating tails. One interesting result is that the tail duplication actually reduces the

Re: PowerPC shrink-wrap support 3 of 3

2011-10-31 Thread Alan Modra
So I'm at the point where I'm reasonably happy with this work. This patch doesn't do anything particularly clever regarding our shrink-wrap implementation. We still only insert one copy of the prologue, and one of the epilogue in thread_prologue_and_epilogue. All it really does is replaces

Re: PowerPC shrink-wrap support 3 of 3

2011-10-27 Thread Alan Modra
On Thu, Oct 27, 2011 at 12:24:46AM +1030, Alan Modra wrote: more code than duplicating epilogues. From what I've seen, the duplicate tails are generally very small. I guess I should dump out some info so we can get a better idea. There were 545 occurrences of shrink-wrap in the gcc/ dir for

Re: PowerPC shrink-wrap support 3 of 3

2011-10-26 Thread Alan Modra
On Sun, Oct 16, 2011 at 02:51:01PM -0400, David Edelsohn wrote: The patch is okay, although I am not thrilled about the need to change the register allocation order. Committed revision 180522. It turns out that shrink-wrapping isn't as effective as it used to be with the 20110915 based sources

Re: PowerPC shrink-wrap support 3 of 3

2011-10-26 Thread Bernd Schmidt
On 10/26/11 14:27, Alan Modra wrote: Committed revision 180522. It turns out that shrink-wrapping isn't as effective as it used to be with the 20110915 based sources I was using originally. povray Ray_In_Bound no longer gets the benefit of shrink wrap, likely due to some cfg optimization.

Re: PowerPC shrink-wrap support 3 of 3

2011-10-26 Thread Alan Modra
On Wed, Oct 26, 2011 at 03:01:01PM +0200, Bernd Schmidt wrote: On 10/26/11 14:27, Alan Modra wrote: Committed revision 180522. It turns out that shrink-wrapping isn't as effective as it used to be with the 20110915 based sources I was using originally. povray Ray_In_Bound no longer gets

Re: PowerPC shrink-wrap support 3 of 3

2011-10-26 Thread Alan Modra
On Wed, Oct 26, 2011 at 03:59:36PM +0200, Bernd Schmidt wrote: On 10/26/11 15:54, Alan Modra wrote: I guess the tradeoff between the classic shrink-wrap epilogue scheme and my duplicate tail idea is whether duplicating tail blocks adds more code than duplicating epilogues. From what I've

Re: PowerPC shrink-wrap support 3 of 3

2011-10-16 Thread David Edelsohn
On Wed, Sep 28, 2011 at 11:47 AM, Alan Modra amo...@gmail.com wrote:        * config/rs6000/rs6000.c (rs6000_make_savres_rtx): Delete unneeded        declaration.        (rs6000_emit_stack_reset): Only return insn emitted when it adjusts sp.        (rs6000_make_savres_rtx): Rename to

Re: PowerPC shrink-wrap support 3 of 3

2011-09-28 Thread Alan Modra
This supercedes http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01004.html and http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01593.html, fixing the two regressions introduced by those patches. The first patch is unchanged except to leave all the out-of-line restore functions using return rather than

Re: PowerPC shrink-wrap support 3 of 3

2011-09-26 Thread Alan Modra
This patch fixes an issue that limit opportunities for shrink-wrapping on PowerPC. The rs6000 REG_ALLOC_ORDER chooses r0 as the very first gpr to use in code, with r11 also having high priority. This means it is quite likely that r0 or r11 is live on the edge chosen for shrink-wrapping. That's

Re: PowerPC shrink-wrap support 3 of 3

2011-09-26 Thread Alan Modra
On Mon, Sep 26, 2011 at 11:22:54PM +0930, Alan Modra wrote: Two regressions appeared due to a problem in the shrink-wrap code. These two. +FAIL: g++.dg/torture/pr46111.C -O1 (internal compiler error) +FAIL: gcc.dg/autopar/pr46099.c (internal compiler error) Both internal compiler error: in

Re: PowerPC shrink-wrap support 3 of 3

2011-09-26 Thread Bernd Schmidt
On 09/27/11 00:32, Alan Modra wrote: On Mon, Sep 26, 2011 at 11:22:54PM +0930, Alan Modra wrote: Two regressions appeared due to a problem in the shrink-wrap code. These two. +FAIL: g++.dg/torture/pr46111.C -O1 (internal compiler error) +FAIL: gcc.dg/autopar/pr46099.c (internal compiler

Re: PowerPC shrink-wrap support 3 of 3

2011-09-26 Thread Alan Modra
On Tue, Sep 27, 2011 at 12:39:36AM +0200, Bernd Schmidt wrote: On 09/27/11 00:32, Alan Modra wrote: On Mon, Sep 26, 2011 at 11:22:54PM +0930, Alan Modra wrote: Two regressions appeared due to a problem in the shrink-wrap code. These two. +FAIL: g++.dg/torture/pr46111.C -O1 (internal

Re: PowerPC shrink-wrap support 3 of 3

2011-09-26 Thread Bernd Schmidt
On 09/27/11 02:11, Alan Modra wrote: On Tue, Sep 27, 2011 at 12:39:36AM +0200, Bernd Schmidt wrote: On 09/27/11 00:32, Alan Modra wrote: On Mon, Sep 26, 2011 at 11:22:54PM +0930, Alan Modra wrote: Two regressions appeared due to a problem in the shrink-wrap code. These two. +FAIL:

PowerPC shrink-wrap support 3 of 3

2011-09-17 Thread Alan Modra
Finally, the powerpc backend changes. These are mostly just mechanical. I'll note that we need both simple_return and return variants of the conditional returns because they can only be used when no epilogue is required. The return variant must use direct_return() as a predicate to check this