From patchwork Sat May 2 21:01:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tbsaunde+gcc@tbsaunde.org X-Patchwork-Id: 467341 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 0370A1402B4 for ; Sun, 3 May 2015 07:04:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=p0Z+yw2v; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=JtB4ejHiZaWK8kXzOxBqqkHUz+/7CpSBy69HCHAyG6JOYCyyHoSyP R7Ek0+/Xxz7c8klIq+NyJCpXu4jVcx+4ZlXZA9XvIns4gEZqQCBBoT5iqDDC7Psv 68yisNfrdT5lg1X+yev/6PON1lOstwjKY1uH3TEzNp8AYA8AfgPHLo= 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:subject:date:message-id:in-reply-to:references; s=default; bh=r8s0kxsDKx8OBxt/NvLyC5X81As=; b=p0Z+yw2vm2yxQYARvPLs1n7ron0K qPiUKyEE57QO1o+T8oT2I9Hnf8o016eaPnmGz/2HPN7d6Xv9hBzXQHteYobUA6hL Nrpr7V38iwWbsyaQUd9fB4Cob4x9att/vXfMZxIrIdA/NCgpQ3aXNjqPt+AGTkXM blC05fxrTTpYmVY= Received: (qmail 22809 invoked by alias); 2 May 2015 21:02:37 -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 22750 invoked by uid 89); 2 May 2015 21:02:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 02 May 2015 21:02:35 +0000 Received: from iceball.corp.tor1.mozilla.com (unknown [23.233.68.71]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id F1C73C072 for ; Sat, 2 May 2015 21:02:34 +0000 (UTC) From: tbsaunde+gcc@tbsaunde.org To: gcc-patches@gcc.gnu.org Subject: [PATCH 11/13] type reg_equiv_init as rtx_insn_list Date: Sat, 2 May 2015 17:01:41 -0400 Message-Id: <1430600503-14069-12-git-send-email-tbsaunde+gcc@tbsaunde.org> In-Reply-To: <1430600503-14069-1-git-send-email-tbsaunde+gcc@tbsaunde.org> References: <1430600503-14069-1-git-send-email-tbsaunde+gcc@tbsaunde.org> X-IsSubscribed: yes From: Trevor Saunders gcc/ChangeLog: 2015-05-02 Trevor Saunders * reload.h (struct reg_equivs_t): Change type of init to rtx_insn *. * ira.c (fix_reg_equiv_init): Adjust. * reload1.c (eliminate_regs_1): Likewise. (init_eliminable_invariants): Likewise. --- gcc/ChangeLog | 8 ++++++++ gcc/ira.c | 12 +++++++----- gcc/reload.h | 2 +- gcc/reload1.c | 8 ++++---- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3e23bd..59fa7f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2015-05-02 Trevor Saunders + * reload.h (struct reg_equivs_t): Change type of init to + rtx_insn *. + * ira.c (fix_reg_equiv_init): Adjust. + * reload1.c (eliminate_regs_1): Likewise. + (init_eliminable_invariants): Likewise. + +2015-05-02 Trevor Saunders + * cselib.c (fp_setter_insn): Take a rtx_insn *. * cselib.h (fp_setter_insn): Adjust. diff --git a/gcc/ira.c b/gcc/ira.c index 25baa90..ab8e9ce 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -2709,20 +2709,22 @@ fix_reg_equiv_init (void) { int max_regno = max_reg_num (); int i, new_regno, max; - rtx x, prev, next, insn, set; + rtx set; + rtx_insn_list *x, *next, *prev; + rtx_insn *insn; if (max_regno_before_ira < max_regno) { max = vec_safe_length (reg_equivs); grow_reg_equivs (); for (i = FIRST_PSEUDO_REGISTER; i < max; i++) - for (prev = NULL_RTX, x = reg_equiv_init (i); + for (prev = NULL, x = reg_equiv_init (i); x != NULL_RTX; x = next) { - next = XEXP (x, 1); - insn = XEXP (x, 0); - set = single_set (as_a (insn)); + next = x->next (); + insn = x->insn (); + set = single_set (insn); ira_assert (set != NULL_RTX && (REG_P (SET_DEST (set)) || REG_P (SET_SRC (set)))); if (REG_P (SET_DEST (set)) diff --git a/gcc/reload.h b/gcc/reload.h index c777e54..a58b902 100644 --- a/gcc/reload.h +++ b/gcc/reload.h @@ -239,7 +239,7 @@ struct reg_equivs_t /* The list of insns that initialized reg N from its equivalent constant or memory slot. */ - rtx init; + rtx_insn_list *init; }; #define reg_equiv_constant(ELT) \ diff --git a/gcc/reload1.c b/gcc/reload1.c index 82b106e..4c47906 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -2619,7 +2619,7 @@ eliminate_regs_1 (rtx x, machine_mode mem_mode, rtx insn, mem_mode, insn, true, for_costs); /* There exists at least one use of REGNO that cannot be eliminated. Prevent the defining insn from being deleted. */ - reg_equiv_init (regno) = NULL_RTX; + reg_equiv_init (regno) = NULL; if (!for_costs) alter_reg (regno, -1, true); } @@ -4252,17 +4252,17 @@ init_eliminable_invariants (rtx_insn *first, bool do_subregs) { reg_equiv_memory_loc (i) = force_const_mem (mode, x); if (! reg_equiv_memory_loc (i)) - reg_equiv_init (i) = NULL_RTX; + reg_equiv_init (i) = NULL; } } else { - reg_equiv_init (i) = NULL_RTX; + reg_equiv_init (i) = NULL; continue; } } else - reg_equiv_init (i) = NULL_RTX; + reg_equiv_init (i) = NULL; } }