From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31672 invoked by alias); 6 Aug 2014 17:19:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 31152 invoked by uid 89); 6 Aug 2014 17:19:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 06 Aug 2014 17:19:42 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s76HJdUj024216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 13:19:40 -0400 Received: from c64.redhat.com (vpn-239-139.phx2.redhat.com [10.3.239.139]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s76HJ2od030913; Wed, 6 Aug 2014 13:19:39 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 063/236] compare-elim.c: Use rtx_insn Date: Wed, 06 Aug 2014 17:19:00 -0000 Message-Id: <1407345815-14551-64-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> References: <1407345815-14551-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00511.txt.bz2 gcc/ * compare-elim.c (struct comparison_use): Strengthen field "insn" from rtx to rtx_insn *. (struct comparison): Likewise, also for field "prev_clobber". (conforming_compare): Likewise for param "insn". (arithmetic_flags_clobber_p): Likewise. (find_flags_uses_in_insn): Likewise. (find_comparison_dom_walker::before_dom_children): Likewise for locals "insn", "next", "last_clobber". (try_eliminate_compare): Likewise for locals "insn", "bb_head". --- gcc/compare-elim.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index a373799..979c12b 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -81,7 +81,7 @@ along with GCC; see the file COPYING3. If not see struct comparison_use { /* The instruction in which the result of the compare is used. */ - rtx insn; + rtx_insn *insn; /* The location of the flags register within the use. */ rtx *loc; /* The comparison code applied against the flags register. */ @@ -91,10 +91,10 @@ struct comparison_use struct comparison { /* The comparison instruction. */ - rtx insn; + rtx_insn *insn; /* The insn prior to the comparison insn that clobbers the flags. */ - rtx prev_clobber; + rtx_insn *prev_clobber; /* The two values being compared. These will be either REGs or constants. */ @@ -126,7 +126,7 @@ static vec all_compares; the rtx for the COMPARE itself. */ static rtx -conforming_compare (rtx insn) +conforming_compare (rtx_insn *insn) { rtx set, src, dest; @@ -156,7 +156,7 @@ conforming_compare (rtx insn) correct. The term "arithmetic" may be somewhat misleading... */ static bool -arithmetic_flags_clobber_p (rtx insn) +arithmetic_flags_clobber_p (rtx_insn *insn) { rtx pat, x; @@ -191,7 +191,7 @@ arithmetic_flags_clobber_p (rtx insn) it in CMP; otherwise indicate that we've missed a use. */ static void -find_flags_uses_in_insn (struct comparison *cmp, rtx insn) +find_flags_uses_in_insn (struct comparison *cmp, rtx_insn *insn) { df_ref *use_rec, use; @@ -260,7 +260,7 @@ void find_comparison_dom_walker::before_dom_children (basic_block bb) { struct comparison *last_cmp; - rtx insn, next, last_clobber; + rtx_insn *insn, *next, *last_clobber; bool last_cmp_valid; bitmap killed; @@ -291,7 +291,7 @@ find_comparison_dom_walker::before_dom_children (basic_block bb) { rtx src; - next = (insn == BB_END (bb) ? NULL_RTX : NEXT_INSN (insn)); + next = (insn == BB_END (bb) ? NULL : NEXT_INSN (insn)); if (!NONDEBUG_INSN_P (insn)) continue; @@ -490,7 +490,8 @@ maybe_select_cc_mode (struct comparison *cmp, rtx a ATTRIBUTE_UNUSED, static bool try_eliminate_compare (struct comparison *cmp) { - rtx x, insn, bb_head, flags, in_a, cmp_src; + rtx_insn *insn, *bb_head; + rtx x, flags, in_a, cmp_src; /* We must have found an interesting "clobber" preceding the compare. */ if (cmp->prev_clobber == NULL) -- 1.8.5.3