From patchwork Fri Nov 25 13:13:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 127692 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 200371007DA for ; Sat, 26 Nov 2011 00:14:37 +1100 (EST) Received: (qmail 12776 invoked by alias); 25 Nov 2011 13:14:35 -0000 Received: (qmail 12725 invoked by uid 22791); 25 Nov 2011 13:14:34 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 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; Fri, 25 Nov 2011 13:14:17 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1RTvbb-0005sV-G7 from Tom_deVries@mentor.com ; Fri, 25 Nov 2011 05:14:15 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 25 Nov 2011 05:11:03 -0800 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Fri, 25 Nov 2011 13:14:13 +0000 Message-ID: <4ECF9493.5040008@mentor.com> Date: Fri, 25 Nov 2011 14:13:55 +0100 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 MIME-Version: 1.0 To: Steven Bosscher CC: Michael Matz , Eric Botcazou , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Remove dead labels to increase superblock scope References: <4EC65977.4020501@mentor.com> <201111182229.14399.ebotcazou@adacore.com> <4EC6E724.4090008@mentor.com> <4ECF70A6.4040200@mentor.com> In-Reply-To: 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 On 25/11/11 14:05, Steven Bosscher wrote: > On Fri, Nov 25, 2011 at 2:03 PM, Michael Matz wrote: >> Hi, >> >> On Fri, 25 Nov 2011, Tom de Vries wrote: >> >>>> Note that you actually can remove labels also if they are >>>> !can_delete_label_p, if you use delete_insn (which you do). It will >>>> replace such undeletable labels by a DELETED_LABEL note. >>> >>> I tried that as well but ran into these errors in rtl_verify_flow_info_1: >>> ... >>> libquadmath/printf/cmp.c:56:1: error: NOTE_INSN_BASIC_BLOCK is missing for block 6 >>> libquadmath/printf/cmp.c:56:1: error: NOTE_INSN_BASIC_BLOCK 79 in middle of >>> basic block 6 >> >> Hmpf, probably bitrotted over time. Oh well, so be it. > > No, DELETED_LABEL notes still work just fine. It depends on how you > remove the label and replace it with a note, and Tom isn't showing > what he did, so... This is the patch with which I ran into the rtl_verify_flow_info_1 errors: ... ... Thanks, - Tom > > Ciao! > Steven Index: gcc/cfglayout.c =================================================================== --- gcc/cfglayout.c (revision 181172) +++ gcc/cfglayout.c (working copy) @@ -857,6 +857,9 @@ fixup_reorder_chain (void) (e_taken->src, e_taken->dest)); e_taken->flags |= EDGE_FALLTHRU; update_br_prob_note (bb); + if (LABEL_NUSES (ret_label) == 0 + && single_pred_p (e_taken->dest)) + delete_insn (ret_label); continue; } }