From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23433 invoked by alias); 7 Nov 2011 17:12:02 -0000 Received: (qmail 23411 invoked by uid 22791); 7 Nov 2011 17:12:01 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Nov 2011 17:11:41 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA7HBc0H032103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Nov 2011 12:11:38 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pA7HBbgr026207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 7 Nov 2011 12:11:38 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id pA7HBbNa032591; Mon, 7 Nov 2011 18:11:37 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id pA7HBZHS031708; Mon, 7 Nov 2011 18:11:35 +0100 Date: Mon, 07 Nov 2011 17:27:00 -0000 From: Jakub Jelinek To: Alan Modra , Bernd Schmidt , Richard Henderson Cc: gcc-patches@gcc.gnu.org Subject: Re: PowerPC shrink-wrap support 3 of 3 Message-ID: <20111107171135.GI27375@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <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> <20111031142722.GX29439@bubble.grove.modra.org> <20111101153340.GA31649@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111101153340.GA31649@bubble.grove.modra.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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-11/txt/msg01010.txt.bz2 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 > * function.c (bb_active_p): Delete. > (dup_block_and_redirect, active_insn_between): New functions. > (convert_jumps_to_returns, emit_return_for_exit): New functions, > split out from.. > (thread_prologue_and_epilogue_insns): ..here. Delete > shadowing variables. Don't do prologue register clobber tests > when shrink wrapping already failed. Delete all last_bb_active > code. Instead compute tail block candidates for duplicating > exit path. Remove these from antic set. Duplicate tails when > reached from both blocks needing a prologue/epilogue and > blocks not needing such. > * ifcvt.c (dead_or_predicable): Test both flag_shrink_wrap and > HAVE_simple_return. > * bb-reorder.c (get_uncond_jump_length): Make global. > * bb-reorder.h (get_uncond_jump_length): Declare. > * cfgrtl.c (rtl_create_basic_block): Comment typo fix. > (rtl_split_edge): Likewise. Warning fix. > (rtl_duplicate_bb): New function. > (rtl_cfg_hooks): Enable can_duplicate_block_p and duplicate_block. > > Index: gcc/function.c > =================================================================== > --- gcc/function.c (revision 180588) > +++ gcc/function.c (working copy) > @@ -65,6 +65,8 @@ along with GCC; see the file COPYING3. > #include "df.h" > #include "timevar.h" > #include "vecprim.h" > +#include "params.h" > +#include "bb-reorder.h" This needs corresponding change in Makefile.in, function.o needs $(PARAMS_H) bb-reorder.h dependencies added. Ok for trunk with that change if no maintainer objects within 24 hours. Jakub