From patchwork Thu Aug 2 20:40:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 174810 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 65D7D2C0096 for ; Fri, 3 Aug 2012 06:41:07 +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=1344544868; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Mail-Followup-To:Subject:Date:Message-ID: User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=6HnkCeLs5q3/jRa9wJKRZo4lxQE=; b=MNIrkwKNBX8nGWl V9suPSJm0+HIyUc21BhtOvquk/hlPs/j5etQcBMtEjP7zpMYJsGEGKm8aoyZmYJm mZPIiQkEUkpLI9Fc9bSeL6ftmW4ZB1QXAXF7Z/FBhDeVN1cLLP9Kg8nQxAebXE4J Tp7C9Z++oQNCC0CqPLdWfBNI4ne8= 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:From:To:Mail-Followup-To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=p5UJDrej6cFcQYA8dm/CZva6BGGHS+rcMxSnhbysCViRDpboRIP5+3g3fmdb65 ct5IpYAzE7iYzSgIrq68a/S+EhmUJa3QmF/nzluoysZ7qZK5Y8dwXSEk8roE4xIi LKwRtt4rJcr6d/LPa6WBq+bLmXsdDPqXILt+FG5kt+ZqA=; Received: (qmail 2770 invoked by alias); 2 Aug 2012 20:41:03 -0000 Received: (qmail 2752 invoked by uid 22791); 2 Aug 2012 20:41:01 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f51.google.com (HELO mail-wg0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Aug 2012 20:40:47 +0000 Received: by wgbed3 with SMTP id ed3so6445188wgb.8 for ; Thu, 02 Aug 2012 13:40:45 -0700 (PDT) Received: by 10.180.106.137 with SMTP id gu9mr7479621wib.20.1343940045777; Thu, 02 Aug 2012 13:40:45 -0700 (PDT) Received: from localhost ([2.26.188.227]) by mx.google.com with ESMTPS id k20sm35619199wiv.11.2012.08.02.13.40.43 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Aug 2012 13:40:44 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: [committed] Remove old REG_BR_PRED code from dbr_schedule Date: Thu, 02 Aug 2012 21:40:58 +0100 Message-ID: <87wr1hm3hh.fsf@talisman.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 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 This patch fixes a disagreement about the form of REG_BR_PRED. I came across it as an rtl-checking ICE when inverting a jump after dbr_schedule. REG_BR_PRED used to be just a single int (and is still documented that way, although I'm going to chicken out of fixing that). dbr_schedule created the notes at the end, so that targets could tell whether the branch was assumed to be likely-taken or not. However, no target now uses this information, and all other references to the notes are for the new 2-int style. This patch therefore removes the old code as dead. Tested on mips64-linux-gnu and applied. Richard gcc/ * reorg.c (dbr_schedule): Delete REG_BR_PRED loop. Index: gcc/reorg.c =================================================================== --- gcc/reorg.c 2012-08-02 21:19:07.320527035 +0100 +++ gcc/reorg.c 2012-08-02 21:21:53.698526627 +0100 @@ -4054,28 +4054,6 @@ dbr_schedule (rtx first) fprintf (dump_file, "\n"); } - /* For all JUMP insns, fill in branch prediction notes, so that during - assembler output a target can set branch prediction bits in the code. - We have to do this now, as up until this point the destinations of - JUMPS can be moved around and changed, but past right here that cannot - happen. */ - for (insn = first; insn; insn = NEXT_INSN (insn)) - { - int pred_flags; - - if (NONJUMP_INSN_P (insn)) - { - rtx pat = PATTERN (insn); - - if (GET_CODE (pat) == SEQUENCE) - insn = XVECEXP (pat, 0, 0); - } - if (!JUMP_P (insn)) - continue; - - pred_flags = get_jump_flags (insn, JUMP_LABEL (insn)); - add_reg_note (insn, REG_BR_PRED, GEN_INT (pred_flags)); - } free_resource_info (); free (uid_to_ruid); #ifdef DELAY_SLOTS_FOR_EPILOGUE