From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23726 invoked by alias); 6 Aug 2014 18:02:34 -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 23607 invoked by uid 89); 6 Aug 2014 18:02:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 06 Aug 2014 18:02:32 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF4uI-0001jM-Ny for gcc-patches@gcc.gnu.org; Wed, 06 Aug 2014 13:21:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF4uI-0001jE-H8 for gcc-patches@gcc.gnu.org; Wed, 06 Aug 2014 13:21:46 -0400 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 s76HKj5Q006038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 6 Aug 2014 13:20:45 -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 s76HJ2qW030913; Wed, 6 Aug 2014 13:20:44 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 176/236] cselib and incdec Date: Wed, 06 Aug 2014 18:02:00 -0000 Message-Id: <1407345815-14551-177-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-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00711.txt.bz2 gcc/ * rtl.h (for_each_inc_dec): Strengthen param 1 from rtx * to rtx_insn **. (check_for_inc_dec): Strengthen param "insn" from rtx to rtx_insn *. * cselib.h (cselib_process_insn): Likewise. * cselib.c (cselib_record_sets): Likewise. (cselib_process_insn): Likewise. * dse.c (struct insn_info): Likewise for field "insn". (check_for_inc_dec_1): Likewise for local "insn". (check_for_inc_dec): Likewise for param "insn". (scan_insn): Likewise. (dse_step1): Likewise for local "insn". * rtlanal.c (for_each_inc_dec): Strengthen param 1 from rtx * to rtx_insn **. Use for_each_rtx_in_insn rather than for_each_rtx. --- gcc/cselib.c | 6 +++--- gcc/cselib.h | 2 +- gcc/dse.c | 10 +++++----- gcc/rtl.h | 4 ++-- gcc/rtlanal.c | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gcc/cselib.c b/gcc/cselib.c index 00a04ba..c453904 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -67,7 +67,7 @@ static cselib_val *cselib_lookup_mem (rtx, int); static void cselib_invalidate_regno (unsigned int, enum machine_mode); static void cselib_invalidate_mem (rtx); static void cselib_record_set (rtx, cselib_val *, cselib_val *); -static void cselib_record_sets (rtx); +static void cselib_record_sets (rtx_insn *); struct expand_value_data { @@ -2468,7 +2468,7 @@ cselib_record_autoinc_cb (rtx mem ATTRIBUTE_UNUSED, rtx op ATTRIBUTE_UNUSED, /* Record the effects of any sets and autoincs in INSN. */ static void -cselib_record_sets (rtx insn) +cselib_record_sets (rtx_insn *insn) { int n_sets = 0; int i; @@ -2626,7 +2626,7 @@ fp_setter_insn (rtx insn) /* Record the effects of INSN. */ void -cselib_process_insn (rtx insn) +cselib_process_insn (rtx_insn *insn) { int i; rtx x; diff --git a/gcc/cselib.h b/gcc/cselib.h index 785f3b6..62374c0 100644 --- a/gcc/cselib.h +++ b/gcc/cselib.h @@ -75,7 +75,7 @@ extern cselib_val *cselib_lookup_from_insn (rtx, enum machine_mode, extern void cselib_init (int); extern void cselib_clear_table (void); extern void cselib_finish (void); -extern void cselib_process_insn (rtx); +extern void cselib_process_insn (rtx_insn *); extern bool fp_setter_insn (rtx); extern enum machine_mode cselib_reg_set_mode (const_rtx); extern int rtx_equal_for_cselib_p (rtx, rtx); diff --git a/gcc/dse.c b/gcc/dse.c index 167920c..0dc6b22 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -380,7 +380,7 @@ struct insn_info bool contains_cselib_groups; /* The insn. */ - rtx insn; + rtx_insn *insn; /* The list of mem sets or mem clobbers that are contained in this insn. If the insn is deletable, it contains only one mem set. @@ -904,7 +904,7 @@ emit_inc_dec_insn_before (rtx mem ATTRIBUTE_UNUSED, static bool check_for_inc_dec_1 (insn_info_t insn_info) { - rtx insn = insn_info->insn; + rtx_insn *insn = insn_info->insn; rtx note = find_reg_note (insn, REG_INC, NULL_RTX); if (note) return for_each_inc_dec (&insn, emit_inc_dec_insn_before, insn_info) == 0; @@ -917,7 +917,7 @@ check_for_inc_dec_1 (insn_info_t insn_info) and add a parameter to this function so that it can be passed down in insn_info.fixed_regs_live. */ bool -check_for_inc_dec (rtx insn) +check_for_inc_dec (rtx_insn *insn) { struct insn_info insn_info; rtx note; @@ -2444,7 +2444,7 @@ copy_fixed_regs (const_bitmap in) non-register target. */ static void -scan_insn (bb_info_t bb_info, rtx insn) +scan_insn (bb_info_t bb_info, rtx_insn *insn) { rtx body; insn_info_t insn_info = (insn_info_t) pool_alloc (insn_info_pool); @@ -2710,7 +2710,7 @@ dse_step1 (void) if (bb->index >= NUM_FIXED_BLOCKS) { - rtx insn; + rtx_insn *insn; cse_store_info_pool = create_alloc_pool ("cse_store_info_pool", diff --git a/gcc/rtl.h b/gcc/rtl.h index 3b7ff48..82431f4 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2624,7 +2624,7 @@ extern int for_each_rtx_in_insn (rtx_insn **, rtx_function, void *); for_each_inc_dec. */ typedef int (*for_each_inc_dec_fn) (rtx mem, rtx op, rtx dest, rtx src, rtx srcoff, void *arg); -extern int for_each_inc_dec (rtx *, for_each_inc_dec_fn, void *arg); +extern int for_each_inc_dec (rtx_insn **, for_each_inc_dec_fn, void *arg); typedef int (*rtx_equal_p_callback_function) (const_rtx *, const_rtx *, rtx *, rtx *); @@ -3029,7 +3029,7 @@ extern int exp_equiv_p (const_rtx, const_rtx, int, bool); extern unsigned hash_rtx (const_rtx x, enum machine_mode, int *, int *, bool); /* In dse.c */ -extern bool check_for_inc_dec (rtx insn); +extern bool check_for_inc_dec (rtx_insn *insn); /* In jump.c */ extern int comparison_dominates_p (enum rtx_code, enum rtx_code); diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 9481d52..5c5e643 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -3120,7 +3120,7 @@ for_each_inc_dec_find_mem (rtx *r, void *d) return 0; } -/* Traverse *X looking for MEMs, and for autoinc operations within +/* Traverse *INSN looking for MEMs, and for autoinc operations within them. For each such autoinc operation found, call FN, passing it the innermost enclosing MEM, the operation itself, the RTX modified by the operation, two RTXs (the second may be NULL) that, once @@ -3131,7 +3131,7 @@ for_each_inc_dec_find_mem (rtx *r, void *d) for_each_inc_dec. */ int -for_each_inc_dec (rtx *x, +for_each_inc_dec (rtx_insn **insn, for_each_inc_dec_fn fn, void *arg) { @@ -3141,7 +3141,7 @@ for_each_inc_dec (rtx *x, data.arg = arg; data.mem = NULL; - return for_each_rtx (x, for_each_inc_dec_find_mem, &data); + return for_each_rtx_in_insn (insn, for_each_inc_dec_find_mem, &data); } -- 1.8.5.3