From 2d93cd20051abb91b4bd339da300a6189ed773be Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Wed, 2 Nov 2016 03:46:10 +0000 Subject: [PATCH] remove cast in delete_insn_chain gcc/ChangeLog: 2016-11-01 Trevor Saunders * cfgrtl.c (delete_insn_chain): Change argument type to rtx_insn * and adjust for that. * cfgrtl.h (delete_insn_chain): Adjust prototype. From-SVN: r241772 --- gcc/ChangeLog | 6 ++++++ gcc/cfgrtl.c | 8 +++----- gcc/cfgrtl.h | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa3df169640..00d5a78c1bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-11-01 Trevor Saunders + + * cfgrtl.c (delete_insn_chain): Change argument type to rtx_insn * + and adjust for that. + * cfgrtl.h (delete_insn_chain): Adjust prototype. + 2016-11-01 Trevor Saunders * config/rl78/rl78.c (gen-and_emit_move): Change argument type diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 813f7cee092..d2719db0019 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -240,17 +240,15 @@ delete_insn_and_edges (rtx_insn *insn) insns that cannot be removed to NULL. */ void -delete_insn_chain (rtx start, rtx finish, bool clear_bb) +delete_insn_chain (rtx start, rtx_insn *finish, bool clear_bb) { - rtx_insn *prev, *current; - /* Unchain the insns one by one. It would be quicker to delete all of these with a single unchaining, rather than one at a time, but we need to keep the NOTE's. */ - current = safe_as_a (finish); + rtx_insn *current = finish; while (1) { - prev = PREV_INSN (current); + rtx_insn *prev = PREV_INSN (current); if (NOTE_P (current) && !can_delete_note_p (as_a (current))) ; else diff --git a/gcc/cfgrtl.h b/gcc/cfgrtl.h index d81928a6ebf..f4c139605a2 100644 --- a/gcc/cfgrtl.h +++ b/gcc/cfgrtl.h @@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see extern void delete_insn (rtx); extern bool delete_insn_and_edges (rtx_insn *); -extern void delete_insn_chain (rtx, rtx, bool); +extern void delete_insn_chain (rtx, rtx_insn *, bool); extern basic_block create_basic_block_structure (rtx_insn *, rtx_insn *, rtx_note *, basic_block); extern void compute_bb_for_insn (void); -- 2.30.2