From: David Malcolm Date: Tue, 26 Aug 2014 19:51:02 +0000 (+0000) Subject: duplicate_insn_chain accepts rtx_insn X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d34b05026b5af531e8cecc4bc70a76a0d23093d;p=gcc.git 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. From-SVN: r214544 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49cd7aeb9d3..a1c7898db4c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +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 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);