From 623ad592bd2319a7090176badac884fbcaa3304c Mon Sep 17 00:00:00 2001 From: rsandifo Date: Thu, 28 Aug 2014 06:24:36 +0000 Subject: gcc/ * rtl.h (for_each_inc_dec_fn): Remove special case for -1. (for_each_inc_dec): Take an rtx rather than an rtx *. * cselib.c (cselib_record_autoinc_cb): Update accordingly. (cselib_record_sets): Likewise. * dse.c (emit_inc_dec_insn_before, check_for_inc_dec_1) (check_for_inc_dec): Likewise. * rtlanal.c (for_each_inc_dec_ops): Delete. (for_each_inc_dec_find_inc_dec): Take the MEM as argument, rather than a pointer to the memory address. Replace for_each_inc_dec_ops argument with separate function and data arguments. Abort on non-autoinc addresses. (for_each_inc_dec_find_mem): Delete. (for_each_inc_dec): Take an rtx rather than an rtx *. Use FOR_EACH_SUBRTX_VAR to visit every autoinc MEM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214657 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dse.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc/dse.c') diff --git a/gcc/dse.c b/gcc/dse.c index a2e38a535ee..4c4a2a4e6f1 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -894,7 +894,7 @@ emit_inc_dec_insn_before (rtx mem ATTRIBUTE_UNUSED, emit_insn_before (new_insn, insn); - return -1; + return 0; } /* Before we delete INSN_INFO->INSN, make sure that the auto inc/dec, if it @@ -907,7 +907,8 @@ check_for_inc_dec_1 (insn_info_t insn_info) 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; + return for_each_inc_dec (PATTERN (insn), emit_inc_dec_insn_before, + insn_info) == 0; return true; } @@ -926,7 +927,8 @@ check_for_inc_dec (rtx_insn *insn) insn_info.fixed_regs_live = NULL; 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; + return for_each_inc_dec (PATTERN (insn), emit_inc_dec_insn_before, + &insn_info) == 0; return true; } -- cgit v1.2.1