From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24030 invoked by alias); 9 May 2014 06:43:31 -0000 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 Received: (qmail 23864 invoked by uid 89); 9 May 2014 06:43:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f172.google.com Received: from mail-lb0-f172.google.com (HELO mail-lb0-f172.google.com) (209.85.217.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 09 May 2014 06:43:29 +0000 Received: by mail-lb0-f172.google.com with SMTP id l4so5159443lbv.3 for ; Thu, 08 May 2014 23:43:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4qBVaul7cZRE5Qm8BlVXT8esjwheDUEK4g+DmYhRbCo=; b=HrIFI/c6EwxPQPtjOONkHC+K0nrbqqKpau4+xT/IbWJMr+I1Nxai8B28tctIkvYwl3 iPcN/kTITraglem19p39E9jrq1G3S/c9sHfkvEu9Erw7koMWA7m2iI9hOhZtwbF7xRB9 cBp9ic8v910fJUv5RnTMM+6JdQtMIrhnPvOshwOpZ+Q5GRbiv4RAsC8PPoSnlcyKUDfO ywf8wSv+1SfHqN03MuwKBHK+uD/OC0l4SBNETmAF4LaW0bYEBbB0q9q4Efv0Hwf4nu9i Ofqu+KBv2aA3DKVbygFU2MXJa0fd9G6aASh3QiXLCJuEapXaddkZJowkYqH4J4O76hAI qVug== X-Gm-Message-State: ALoCoQm7r7pwRXndYue2kzqcqyyU7Cma+qyEDLXyH1mEESxdBA1OL2ukevxKxNbl1Cx+oPQZIdXI MIME-Version: 1.0 X-Received: by 10.152.87.102 with SMTP id w6mr541014laz.46.1399617805932; Thu, 08 May 2014 23:43:25 -0700 (PDT) Received: by 10.112.162.170 with HTTP; Thu, 8 May 2014 23:43:25 -0700 (PDT) In-Reply-To: <536C70DA.1020504@redhat.com> References: <536C70DA.1020504@redhat.com> Date: Fri, 09 May 2014 06:43:00 -0000 Message-ID: Subject: Re: [PATCH, 2/2] shrink wrap a function with a single loop: split live_edge From: Zhenqiang Chen To: Jeff Law Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00560.txt.bz2 On 9 May 2014 14:08, Jeff Law wrote: > On 05/08/14 02:07, Zhenqiang Chen wrote: >> >> Hi, >> >> The patch splits the live_edge for move_insn_for_shrink_wrap to sink >> the copy out of the entry block. >> >> Bootstrap and no make check regression on X86-64 and ARM. >> >> OK for trunk? >> >> Thanks! >> -Zhenqiang >> >> ChangeLog: >> 2014-05-08 Zhenqiang Chen >> >> * function.c (next_block_for_reg): Allow live_edge->dest has two >> predecessors. >> (move_insn_for_shrink_wrap): Split live_edge. >> (prepre_shrink_wrap): One more parameter for >> move_insn_for_shrink_wrap. >> >> >> diff --git a/gcc/function.c b/gcc/function.c >> index 764ac82..0be58e2 100644 >> --- a/gcc/function.c >> +++ b/gcc/function.c >> @@ -5381,7 +5381,7 @@ requires_stack_frame_p (rtx insn, HARD_REG_SET >> prologue_used, >> and if BB is its only predecessor. Return that block if so, >> otherwise return null. */ >> >> -static basic_block >> +static edge >> next_block_for_reg (basic_block bb, int regno, int end_regno) > > Comment for this function needs to be changed. You're no longer returning a > block, but the edge leading to the block. It also seems the name of the > function ought to change. > > This looks basically OK. I'd like to see the requested cleanups made, then > the resulting new patch reposted for a final review. Thank you for the comments. I will follow Steven's comments to separate shrink-wrapping code from function.c to shrink-wrap.c. -Zhenqiang