2014-08-19 David Malcolm <dmalcolm@redhat.com>
+ * rtl.h (unlink_insn_chain): Strengthen return type from rtx to
+ rtx_insn *.
+ (duplicate_insn_chain): Likewise.
+ * cfgrtl.c (unlink_insn_chain): Strengthen return type from rtx to
+ rtx_insn *, also for locals "prevfirst" and "nextlast". Add a
+ checked cast for now (until we can strengthen the params in the
+ same way).
+ (duplicate_insn_chain): Likewise.
+
+2014-08-19 David Malcolm <dmalcolm@redhat.com>
+
* rtl.h (next_cc0_user): Strengthen return type from rtx to
rtx_insn *.
(prev_cc0_setter): Likewise.
\f
/* Cut the insns from FIRST to LAST out of the insns stream. */
-rtx
+rtx_insn *
unlink_insn_chain (rtx first, rtx last)
{
- rtx prevfirst = PREV_INSN (first);
- rtx nextlast = NEXT_INSN (last);
+ rtx_insn *prevfirst = PREV_INSN (first);
+ rtx_insn *nextlast = NEXT_INSN (last);
SET_PREV_INSN (first) = NULL;
SET_NEXT_INSN (last) = NULL;
set_last_insn (prevfirst);
if (!prevfirst)
set_first_insn (nextlast);
- return first;
+ return as_a <rtx_insn *> (first);
}
\f
/* Skip over inter-block insns occurring after BB which are typically
return true;
}
-rtx
+rtx_insn *
duplicate_insn_chain (rtx from, rtx to)
{
rtx insn, next, copy;
}
insn = NEXT_INSN (last);
delete_insn (last);
- return insn;
+ return as_a <rtx_insn *> (insn);
}
/* Create a duplicate of the basic block BB. */
extern rtx_insn *entry_of_function (void);
extern void emit_insn_at_entry (rtx);
extern void delete_insn_chain (rtx, rtx, bool);
-extern rtx unlink_insn_chain (rtx, rtx);
+extern rtx_insn *unlink_insn_chain (rtx, rtx);
extern void delete_insn_and_edges (rtx);
extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx);
extern rtx gen_const_mem (enum machine_mode, rtx);
/* In cfgrtl.c */
extern void print_rtl_with_bb (FILE *, const_rtx, int);
-extern rtx duplicate_insn_chain (rtx, rtx);
+extern rtx_insn *duplicate_insn_chain (rtx, rtx);
/* In expmed.c */
extern void init_expmed (void);