From patchwork Tue Sep 11 12:25:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Bruel X-Patchwork-Id: 183087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 620A12C007B for ; Tue, 11 Sep 2012 22:25:53 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1347971154; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:Subject:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=i8ZFuGtucy8IRYzmpR/GAhP0X10=; b=ST3VtzJM0qp4mDN MH+2AVbm9nk89uWn3oZr4ao/rXt/ACBdZl/Ib1fWsRu3ufyBDuc7Eflo7/BpVPLU nzgLabJu4ca4GsDMlJ3Oh7WW261LfuyQV9TjG+4mFg9FXQqEa9Tj4MeYSS3rTfUW DYHN4neOmOaJ8+O37juH5FldV3iU= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=naDjZQKhD6lkTs2M7eNnG2GuOKb7hxSguFk65t/s9xcrkDH+Ole8enw3Q82sDS seaacEmqsAFJ/u4bUKJYzljWB/rNaygV5riT1V28B+wJ6rHKXgEhGN2s7CY8RQqm 2S16gQ3ToKNXQvRzoom555wcUySJpRbAqbz055h7HNnJc=; Received: (qmail 30931 invoked by alias); 11 Sep 2012 12:25:45 -0000 Received: (qmail 30891 invoked by uid 22791); 11 Sep 2012 12:25:43 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from eu1sys200aog108.obsmtp.com (HELO eu1sys200aog108.obsmtp.com) (207.126.144.125) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Sep 2012 12:25:29 +0000 Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob108.postini.com ([207.126.147.11]) with SMTP ID DSNKUE8tuEXc7zRYKwWP5i8/i0y4it47GyVM@postini.com; Tue, 11 Sep 2012 12:25:29 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E6F69F4 for ; Tue, 11 Sep 2012 12:25:13 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas1.st.com [10.75.90.14]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A8BDA4679 for ; Tue, 11 Sep 2012 12:25:13 +0000 (GMT) Received: from [164.129.122.89] (164.129.122.89) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.3.245.1; Tue, 11 Sep 2012 14:25:13 +0200 Message-ID: <504F2DA8.3050208@st.com> Date: Tue, 11 Sep 2012 14:25:12 +0200 From: Christian Bruel User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: shrink-wrapping duplicates BBs across partitions. X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello, While testing the patch to enable shrink-wrapping on SH [PR54546], we hit an the "error: EDGE_CROSSING missing across section boundary" Indeed, shrink-wrap duplicates a bb with successors (containing the return sequence) into an unlikely section. I first thought about setting the EDGE_CROSSING on flag on those edge, but I feel that this block duplication doesn't go in the direction of this optimization. Not duplicating BBs between partitions solves the problem. Does this restriction look right to you ? (regression tests are still running on x86 and sh) Thanks a lot for any comment. Christian Index: function.c =================================================================== --- function.c (revision 191177) +++ function.c (working copy) @@ -6063,6 +6063,7 @@ FOR_EACH_EDGE (e, ei, tmp_bb->preds) if (single_succ_p (e->src) && !bitmap_bit_p (&bb_on_list, e->src->index) + && (BB_PARTITION (e->src) == BB_PARTITION (e->dest)) && can_duplicate_block_p (e->src)) { edge pe;