From patchwork Sat Jan 18 09:59:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 312278 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DCBF42C009A for ; Sat, 18 Jan 2014 21:21:53 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=yajru8u6L9inbJzBX thghKUtxKNuES7amGVMLlhYwxjsnULAUnkHCfe79aHoGKHNPhhNeTmpuMC7UKvAn t4EhmlKiwTY1JBXs0eWsp3U4rgxmEhfwLg2wvFYdI5BIDRitre1wIv5bN+TxMKj6 kQMX094GUMwcJ/HPyKI/+3XLgM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=MaDjUrkSNOgNNKdHNLmZN6s lP+c=; b=uAVxlJFjkjdbmuWwUYPzpAhYJoZcZaH4k9aA4hj2TfZfJ5dBynqU2L9 qPjONrFrCR1cAFyK8RCn5cPpgW8wwlZ/EKidOk15Y7fbnYyimRLeHOrBMsuPGWra WLt1ZTWedVqISyK2yo/sGmHgz4APvB42AWaexcDTiVtUkrAxF4us= Received: (qmail 17373 invoked by alias); 18 Jan 2014 10:21:46 -0000 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 Received: (qmail 17363 invoked by uid 89); 18 Jan 2014 10:21:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 18 Jan 2014 10:21:45 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0IALhWh020111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 18 Jan 2014 05:21:43 -0500 Received: from tucnak.zalov.cz (vpn1-4-114.ams2.redhat.com [10.36.4.114]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0I9xxQu009734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Jan 2014 05:00:01 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.7/8.14.7) with ESMTP id s0I9xwK7003659; Sat, 18 Jan 2014 10:59:58 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.7/8.14.7/Submit) id s0I9xwds003658; Sat, 18 Jan 2014 10:59:58 +0100 Date: Sat, 18 Jan 2014 10:59:58 +0100 From: Jakub Jelinek To: Eric Botcazou , Steven Bosscher , Jeff Law , Richard Sandiford Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix crossing jumps in functions with forced_labels (PR rtl-optimization/57763) Message-ID: <20140118095958.GP892@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20140117083100.GZ892@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140117083100.GZ892@tucnak.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On Fri, Jan 17, 2014 at 09:31:00AM +0100, Jakub Jelinek wrote: > 2014-01-17 Jakub Jelinek > > PR rtl-optimization/57763 > * bb-reorder.c (fix_crossing_unconditional_branches): Set JUMP_LABEL > on the new indirect jump_insn. Eric requested LABEL_NUSES increment and after looking at the RTL dump, I agree with that. Uros has kindly bootstrapped/regtested this again on alpha-linux and I've (uselessly) bootstrapped/regtested it on x86_64-linux and i686-linux. Ok for trunk? 2014-01-18 Jakub Jelinek PR rtl-optimization/57763 * bb-reorder.c (fix_crossing_unconditional_branches): Set JUMP_LABEL on the new indirect jump_insn and increment LABEL_NUSES (label). Jakub --- gcc/bb-reorder.c.jj 2014-01-16 20:12:54.596006095 +0100 +++ gcc/bb-reorder.c 2014-01-17 10:27:59.330134746 +0100 @@ -2183,6 +2183,9 @@ fix_crossing_unconditional_branches (voi emit_insn_before (indirect_jump_sequence, last_insn); delete_insn (last_insn); + JUMP_LABEL (jump_insn) = label; + LABEL_NUSES (label)++; + /* Make BB_END for cur_bb be the jump instruction (NOT the barrier instruction at the end of the sequence...). */