2014-08-19 David Malcolm <dmalcolm@redhat.com>
+ * emit-rtl.c (last_call_insn): Strengthen return type from rtx to
+ rtx_call_insn *.
+ * rtl.h (is_a_helper <rtx_call_insn *>::test): New overload,
+ accepting an rtx_insn *.
+ (last_call_insn): Strengthen return type from rtx to
+ rtx_call_insn *.
+
+2014-08-19 David Malcolm <dmalcolm@redhat.com>
+
* rtl.h (delete_trivially_dead_insns): Strengthen initial param
"insns" from rtx to rtx_insn *.
* cse.c (delete_trivially_dead_insns): Likewise, also do it for
/* Return the last CALL_INSN in the current list, or 0 if there is none.
This routine does not look inside SEQUENCEs. */
-rtx
+rtx_call_insn *
last_call_insn (void)
{
- rtx insn;
+ rtx_insn *insn;
for (insn = get_last_insn ();
insn && !CALL_P (insn);
insn = PREV_INSN (insn))
;
- return insn;
+ return safe_as_a <rtx_call_insn *> (insn);
}
/* Find the next insn after INSN that really does something. This routine
template <>
template <>
inline bool
+is_a_helper <rtx_call_insn *>::test (rtx_insn *insn)
+{
+ return CALL_P (insn);
+}
+
+template <>
+template <>
+inline bool
is_a_helper <rtx_jump_table_data *>::test (rtx rt)
{
return JUMP_TABLE_DATA_P (rt);
extern rtx emit_use (rtx);
extern rtx make_insn_raw (rtx);
extern void add_function_usage_to (rtx, rtx);
-extern rtx last_call_insn (void);
+extern rtx_call_insn *last_call_insn (void);
extern rtx_insn *previous_insn (rtx);
extern rtx_insn *next_insn (rtx);
extern rtx_insn *prev_nonnote_insn (rtx);