From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25856 invoked by alias); 26 Oct 2011 14:00:00 -0000 Received: (qmail 25846 invoked by uid 22791); 26 Oct 2011 13:59:59 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,TW_CF X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Oct 2011 13:59:43 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RJ418-0004pC-No from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Wed, 26 Oct 2011 06:59:42 -0700 Received: from [127.0.0.1] ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 26 Oct 2011 14:59:41 +0100 Message-ID: <4EA81248.6020801@codesourcery.com> Date: Wed, 26 Oct 2011 14:44:00 -0000 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110920 Lightning/1.0b3pre Thunderbird/3.1.12 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org Subject: Re: PowerPC shrink-wrap support 3 of 3 References: <20110926135254.GJ10321@bubble.grove.modra.org> <20110926223241.GL10321@bubble.grove.modra.org> <4E80FF28.2070509@codesourcery.com> <20110927001120.GM10321@bubble.grove.modra.org> <4E81159C.8090503@codesourcery.com> <20110927004906.GN10321@bubble.grove.modra.org> <20110928154747.GO10321@bubble.grove.modra.org> <20111026122719.GM29439@bubble.grove.modra.org> <4EA8048D.5020000@codesourcery.com> <20111026135446.GO29439@bubble.grove.modra.org> In-Reply-To: <20111026135446.GO29439@bubble.grove.modra.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg02360.txt.bz2 On 10/26/11 15:54, Alan Modra wrote: > 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 the benefit of shrink >>> wrap, likely due to some cfg optimization. We end up with a simple >>> block that just does r3=1 then jumps to last_bb being reached from >>> blocks that need a prologue as well as blocks that don't. That's >>> enough to kill our current shrink wrap implementation. What we need >>> is something to duplicate these tail blocks.. >> >> Would it work to insert the epilogue on some edges to this R3=1 block, >> and not on the others? > > Wouldn't you need to modify all the target epilogue code? Our > epilogues return. Not all of them at once - you could require that if a target has a simple_return pattern, the epilogue does not return. But yes, these kinds of complications are a reason why I went for a simple variant first. > 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 seen, the > duplicate tails are generally very small. I guess I should dump out > some info so we can get a better idea. I suppose if one wanted to avoid inserting more than one epilogue for code-size reasons, one could make a new basic block containing the epilogue, and redirect edges as appropriate. Bernd