summaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-28 06:24:36 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-28 06:24:36 +0000
commit623ad592bd2319a7090176badac884fbcaa3304c (patch)
treedb4367ff6bcb7499b02a7ff3447bdf9b75a3d5e3 /gcc/dse.c
parente4442dc54bce2f54f983091484f01c6106441886 (diff)
downloadgcc-623ad592bd2319a7090176badac884fbcaa3304c.tar.gz
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
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c8
1 files changed, 5 insertions, 3 deletions
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;
}