From baa294b4fd1a0805c83f5feb71a37e7340cde78a Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Tue, 26 Aug 2014 19:51:02 +0000 Subject: [PATCH] duplicate_insn_chain accepts rtx_insn gcc/ 2014-08-26 David Malcolm * rtl.h (duplicate_insn_chain): Strengthen both params from rtx to rtx_insn *. * cfgrtl.c (duplicate_insn_chain): Likewise for params "from", "to" and locals "insn", "next", "copy". Remove now-redundant checked cast. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214544 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/cfgrtl.c | 6 +++--- gcc/rtl.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49cd7aeb9d3..a1c7898db4c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2014-08-26 David Malcolm + * rtl.h (duplicate_insn_chain): Strengthen both params from rtx to + rtx_insn *. + * cfgrtl.c (duplicate_insn_chain): Likewise for params "from", + "to" and locals "insn", "next", "copy". Remove now-redundant + checked cast. + +2014-08-26 David Malcolm + * rtl.h (canonicalize_condition): Strengthen param 1 from rtx to rtx_insn * and param 4 from rtx * to rtx_insn **. (get_condition): Strengthen param 1 from rtx to rtx_insn * and diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index c39049202a3..7d3b8301e78 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -4082,9 +4082,9 @@ cfg_layout_can_duplicate_bb_p (const_basic_block bb) } rtx_insn * -duplicate_insn_chain (rtx from, rtx to) +duplicate_insn_chain (rtx_insn *from, rtx_insn *to) { - rtx insn, next, copy; + rtx_insn *insn, *next, *copy; rtx_note *last; /* Avoid updating of boundaries of previous basic block. The @@ -4167,7 +4167,7 @@ duplicate_insn_chain (rtx from, rtx to) } insn = NEXT_INSN (last); delete_insn (last); - return safe_as_a (insn); + return insn; } /* Create a duplicate of the basic block BB. */ diff --git a/gcc/rtl.h b/gcc/rtl.h index edc6317a9a6..64c4184c0f1 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -3200,7 +3200,7 @@ extern int fixup_args_size_notes (rtx, rtx, int); /* In cfgrtl.c */ extern void print_rtl_with_bb (FILE *, const_rtx, int); -extern rtx_insn *duplicate_insn_chain (rtx, rtx); +extern rtx_insn *duplicate_insn_chain (rtx_insn *, rtx_insn *); /* In expmed.c */ extern void init_expmed (void); -- 2.11.4.GIT