From patchwork Tue Sep 24 17:33:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 277550 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C42262C0082 for ; Wed, 25 Sep 2013 03:33:26 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=ATCH6WN6v6/OhK17 rkZGOX1o8JqSVuqLU2vKZA/TjP6OBzBgWeb3a/Bz4tv26jbg1G4h+ILWpZikoLNp s1/U2WJHAPj7pqj5ZWUQg0EuUNwEBTMIdGVz74HYLTLQBF3AYzOgEiZeZLO6yJEk iNQM3t+QyyDC7oqzY6AN6Fv3lPo= 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:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=snMRDyN9P28n+aBJI84mkV Vi678=; b=eIvCehK3UdX3RaQuYRZ9mgOpjPYO67PTJZuFIbDgF+n+3QPP2S9ee+ xysenUUdkJ4c3zQbkHZygW0R70eAFk6r8d693u4taENmsGSSnmf17juvHfEFaGtB 7XzK8mOT6pqYIIgt7xS3efCQz2W/SqyiaLxPErPd2SL260hkrYEVw= Received: (qmail 27331 invoked by alias); 24 Sep 2013 17:33:21 -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 27321 invoked by uid 89); 24 Sep 2013 17:33:20 -0000 Received: from mail-we0-f169.google.com (HELO mail-we0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 24 Sep 2013 17:33:20 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=ALL_TRUSTED, AWL, BAYES_00, FREEMAIL_FROM autolearn=ham version=3.3.2 X-HELO: mail-we0-f169.google.com Received: by mail-we0-f169.google.com with SMTP id t60so4990345wes.14 for ; Tue, 24 Sep 2013 10:33:17 -0700 (PDT) X-Received: by 10.194.103.201 with SMTP id fy9mr2366998wjb.63.1380043997026; Tue, 24 Sep 2013 10:33:17 -0700 (PDT) Received: from localhost ([2.26.179.106]) by mx.google.com with ESMTPSA id gp9sm9601348wib.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 24 Sep 2013 10:33:16 -0700 (PDT) From: Richard Sandiford To: Andreas Schwab Mail-Followup-To: Andreas Schwab , gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Cc: gcc-patches@gcc.gnu.org Subject: Re: RFA: Store the REG_BR_PROB probability directly as an int References: <87k3i9f7nw.fsf@talisman.default> Date: Tue, 24 Sep 2013 18:33:15 +0100 In-Reply-To: (Andreas Schwab's message of "Tue, 24 Sep 2013 11:46:05 +0200") Message-ID: <87fvsuf7l0.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Andreas Schwab writes: > Richard Sandiford writes: > >> REG_BR_PROB notes are stored as: >> >> (expr_list:REG_BR_PROB (const_int ) ) >> >> but a full const_int rtx seems a bit heavweight when all we want is >> a plain "int". This patch uses: >> >> (int_list:REG_BR_PROB ) >> >> instead. > > I think you left out the handling of INT_LIST in eliminate_regs_1. This > lets me finish the build: Sorry for the breakage. I think we need to handle INT_LIST in the same way as INSN_LIST though, and eliminate in XEXP (x, 1). How about the attached? Testing in progress... Thanks, Richard gcc/ * cse.c (count_reg_usage): Handle INT_LIST. * lra-eliminations.c (lra_eliminate_regs_1): Likewise. * reginfo.c (reg_scan_mark_refs): Likewise. * reload1.c (eliminate_regs_1): Likewise. Index: gcc/cse.c =================================================================== --- gcc/cse.c 2013-09-24 18:29:49.308378918 +0100 +++ gcc/cse.c 2013-09-24 18:29:49.460380403 +0100 @@ -6739,6 +6739,7 @@ count_reg_usage (rtx x, int *counts, rtx return; case INSN_LIST: + case INT_LIST: gcc_unreachable (); default: Index: gcc/lra-eliminations.c =================================================================== --- gcc/lra-eliminations.c 2013-09-24 18:29:49.308378918 +0100 +++ gcc/lra-eliminations.c 2013-09-24 18:29:49.461380412 +0100 @@ -471,6 +471,7 @@ lra_eliminate_regs_1 (rtx x, enum machin /* ... fall through ... */ case INSN_LIST: + case INT_LIST: /* Now do eliminations in the rest of the chain. If this was an EXPR_LIST, this might result in allocating more memory than is strictly needed, but it simplifies the code. */ Index: gcc/reginfo.c =================================================================== --- gcc/reginfo.c 2013-09-24 18:29:49.309378928 +0100 +++ gcc/reginfo.c 2013-09-24 18:29:49.462380422 +0100 @@ -1075,6 +1075,7 @@ reg_scan_mark_refs (rtx x, rtx insn) break; case INSN_LIST: + case INT_LIST: if (XEXP (x, 1)) reg_scan_mark_refs (XEXP (x, 1), insn); break; Index: gcc/reload1.c =================================================================== --- gcc/reload1.c 2013-09-24 18:29:49.311378947 +0100 +++ gcc/reload1.c 2013-09-24 18:29:49.463380432 +0100 @@ -2776,6 +2776,7 @@ eliminate_regs_1 (rtx x, enum machine_mo /* ... fall through ... */ case INSN_LIST: + case INT_LIST: /* Now do eliminations in the rest of the chain. If this was an EXPR_LIST, this might result in allocating more memory than is strictly needed, but it simplifies the code. */