+2018-06-18 David Malcolm <dmalcolm@redhat.com>
+
+ * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
+ param from rtx to rtx_insn *.
+ * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
+ param.
+ (frv_ifcvt_modify_insn): Likwise.
+ (frv_ifcvt_modify_final): Likwise for local "existing_insn",
+ adding an as_a <rtx_insn *> cast. Likewise for local "insn".
+ * config/mips/mips.c (r10k_insert_cache_barriers): Add an
+ as_a <rtx_insn *> cast to local "unprotected_region" once
+ it's been established that it's not NULL or pc_rtx.
+ * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
+ param "sethi" from rtx to rtx_insn *.
+ (nds32_group_float_insns): Likewise for param "insn".
+ * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
+ param.
+ (vax_output_int_subtract): Likewise.
+ * config/vax/vax.c (vax_output_int_add): Likewise for param
+ "insn".
+ (vax_output_int_subtract): Likewise.
+ * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
+ (emit_pattern_after): Likewise for param "after".
+ (emit_insn_after): Likewise.
+ (emit_jump_insn_after): Likewise.
+ (emit_call_insn_after): Likewise.
+ (emit_debug_insn_after): Likewise.
+ (emit_pattern_before): Likewise for param "before".
+ (emit_insn_before): Likewise.
+ (emit_jump_insn_before): Likewise.
+ * final.c (get_insn_template): Likewise for param "insn", removing
+ a cast.
+ * output.h (get_insn_template): Likewise for 2nd param.
+ * rtl.h (emit_insn_before): Likewise.
+ (emit_jump_insn_before): Likewise.
+ (emit_debug_insn_before_noloc): Likewise.
+ (emit_insn_after): Likewise.
+ (emit_jump_insn_after): Likewise.
+ (emit_call_insn_after): Likewise.
+ (emit_debug_insn_after): Likewise.
+ (set_insn_deleted): Likewise for param.
+
2018-06-18 Michael Meissner <meissner@linux.ibm.com>
PR target/85358
extern void frv_ifcvt_modify_multiple_tests
(struct ce_if_block *, basic_block,
rtx *, rtx *);
-extern rtx frv_ifcvt_modify_insn (struct ce_if_block *, rtx, rtx);
+extern rtx frv_ifcvt_modify_insn (struct ce_if_block *, rtx, rtx_insn *);
extern void frv_ifcvt_modify_final (struct ce_if_block *);
extern void frv_ifcvt_modify_cancel (struct ce_if_block *);
#endif
static rtx frv_expand_noargs_builtin (enum insn_code);
static void frv_split_iacc_move (rtx, rtx);
static rtx frv_emit_comparison (enum rtx_code, rtx, rtx);
-static void frv_ifcvt_add_insn (rtx, rtx, int);
+static void frv_ifcvt_add_insn (rtx, rtx_insn *, int);
static rtx frv_ifcvt_rewrite_mem (rtx, machine_mode, rtx);
static rtx frv_ifcvt_load_value (rtx, rtx);
static unsigned int frv_insn_unit (rtx_insn *);
if the conditional execution conversion is successful. */
static void
-frv_ifcvt_add_insn (rtx pattern, rtx insn, int before_p)
+frv_ifcvt_add_insn (rtx pattern, rtx_insn *insn, int before_p)
{
rtx link = alloc_EXPR_LIST (VOIDmode, pattern, insn);
rtx
frv_ifcvt_modify_insn (ce_if_block *ce_info,
rtx pattern,
- rtx insn)
+ rtx_insn *insn)
{
rtx orig_ce_pattern = pattern;
rtx set;
void
frv_ifcvt_modify_final (ce_if_block *ce_info ATTRIBUTE_UNUSED)
{
- rtx existing_insn;
+ rtx_insn *existing_insn;
rtx check_insn;
rtx p = frv_ifcvt.added_insns_list;
int i;
rtx old_p = p;
check_insn = XEXP (check_and_insert_insns, 0);
- existing_insn = XEXP (check_and_insert_insns, 1);
+ existing_insn = as_a <rtx_insn *> (XEXP (check_and_insert_insns, 1));
p = XEXP (p, 1);
/* The jump bit is used to say that the new insn is to be inserted BEFORE
/* Load up any constants needed into temp gprs */
for (i = 0; i < frv_ifcvt.cur_scratch_regs; i++)
{
- rtx insn = emit_insn_before (frv_ifcvt.scratch_regs[i], existing_insn);
+ rtx_insn *insn = emit_insn_before (frv_ifcvt.scratch_regs[i], existing_insn);
if (! frv_ifcvt.scratch_insns_bitmap)
frv_ifcvt.scratch_insns_bitmap = BITMAP_ALLOC (NULL);
bitmap_set_bit (frv_ifcvt.scratch_insns_bitmap, INSN_UID (insn));
if (r10k_needs_protection_p (insn))
{
emit_insn_before (gen_r10k_cache_barrier (),
- unprotected_region);
+ as_a <rtx_insn *> (unprotected_region));
unprotected_region = NULL_RTX;
}
}
/* Group the relax candidates with group id. */
static void
-nds32_group_insns (rtx sethi)
+nds32_group_insns (rtx_insn *sethi)
{
df_ref def_record, use_record;
df_link *link;
flsi $rt, [$ra + offset] */
static void
-nds32_group_float_insns (rtx insn)
+nds32_group_float_insns (rtx_insn *insn)
{
df_ref def_record, use_record;
df_link *link;
extern void vax_notice_update_cc (rtx, rtx);
extern void vax_expand_addsub_di_operands (rtx *, enum rtx_code);
extern const char * vax_output_int_move (rtx, rtx *, machine_mode);
-extern const char * vax_output_int_add (rtx, rtx *, machine_mode);
-extern const char * vax_output_int_subtract (rtx, rtx *, machine_mode);
+extern const char * vax_output_int_add (rtx_insn *, rtx *, machine_mode);
+extern const char * vax_output_int_subtract (rtx_insn *, rtx *, machine_mode);
extern const char * vax_output_movmemsi (rtx, rtx *);
#endif /* RTX_CODE */
which are not modified very often. */
const char *
-vax_output_int_add (rtx insn, rtx *operands, machine_mode mode)
+vax_output_int_add (rtx_insn *insn, rtx *operands, machine_mode mode)
{
switch (mode)
{
}
const char *
-vax_output_int_subtract (rtx insn, rtx *operands, machine_mode mode)
+vax_output_int_subtract (rtx_insn *insn, rtx *operands, machine_mode mode)
{
switch (mode)
{
/* Replace insn with an deleted instruction note. */
void
-set_insn_deleted (rtx insn)
+set_insn_deleted (rtx_insn *insn)
{
if (INSN_P (insn))
- df_insn_delete (as_a <rtx_insn *> (insn));
+ df_insn_delete (insn);
PUT_CODE (insn, NOTE);
NOTE_KIND (insn) = NOTE_INSN_DELETED;
}
any DEBUG_INSNs. */
static rtx_insn *
-emit_pattern_after (rtx pattern, rtx uncast_after, bool skip_debug_insns,
+emit_pattern_after (rtx pattern, rtx_insn *after, bool skip_debug_insns,
rtx_insn *(*make_raw) (rtx))
{
- rtx_insn *after = safe_as_a <rtx_insn *> (uncast_after);
rtx_insn *prev = after;
if (skip_debug_insns)
/* Like emit_insn_after_noloc, but set INSN_LOCATION according to AFTER. */
rtx_insn *
-emit_insn_after (rtx pattern, rtx after)
+emit_insn_after (rtx pattern, rtx_insn *after)
{
return emit_pattern_after (pattern, after, true, make_insn_raw);
}
/* Like emit_jump_insn_after_noloc, but set INSN_LOCATION according to AFTER. */
rtx_jump_insn *
-emit_jump_insn_after (rtx pattern, rtx after)
+emit_jump_insn_after (rtx pattern, rtx_insn *after)
{
return as_a <rtx_jump_insn *> (
emit_pattern_after (pattern, after, true, make_jump_insn_raw));
/* Like emit_call_insn_after_noloc, but set INSN_LOCATION according to AFTER. */
rtx_insn *
-emit_call_insn_after (rtx pattern, rtx after)
+emit_call_insn_after (rtx pattern, rtx_insn *after)
{
return emit_pattern_after (pattern, after, true, make_call_insn_raw);
}
/* Like emit_debug_insn_after_noloc, but set INSN_LOCATION according to AFTER. */
rtx_insn *
-emit_debug_insn_after (rtx pattern, rtx after)
+emit_debug_insn_after (rtx pattern, rtx_insn *after)
{
return emit_pattern_after (pattern, after, false, make_debug_insn_raw);
}
INSN as opposed to a JUMP_INSN, CALL_INSN, etc. */
static rtx_insn *
-emit_pattern_before (rtx pattern, rtx uncast_before, bool skip_debug_insns,
+emit_pattern_before (rtx pattern, rtx_insn *before, bool skip_debug_insns,
bool insnp, rtx_insn *(*make_raw) (rtx))
{
- rtx_insn *before = safe_as_a <rtx_insn *> (uncast_before);
rtx_insn *next = before;
if (skip_debug_insns)
/* Like emit_insn_before_noloc, but set INSN_LOCATION according to BEFORE. */
rtx_insn *
-emit_insn_before (rtx pattern, rtx before)
+emit_insn_before (rtx pattern, rtx_insn *before)
{
return emit_pattern_before (pattern, before, true, true, make_insn_raw);
}
/* Like emit_jump_insn_before_noloc, but set INSN_LOCATION according to BEFORE. */
rtx_jump_insn *
-emit_jump_insn_before (rtx pattern, rtx before)
+emit_jump_insn_before (rtx pattern, rtx_insn *before)
{
return as_a <rtx_jump_insn *> (
emit_pattern_before (pattern, before, true, false,
}
\f
const char *
-get_insn_template (int code, rtx insn)
+get_insn_template (int code, rtx_insn *insn)
{
switch (insn_data[code].output_format)
{
return insn_data[code].output.multi[which_alternative];
case INSN_OUTPUT_FORMAT_FUNCTION:
gcc_assert (insn);
- return (*insn_data[code].output.function) (recog_data.operand,
- as_a <rtx_insn *> (insn));
+ return (*insn_data[code].output.function) (recog_data.operand, insn);
default:
gcc_unreachable ();
extern void leaf_renumber_regs_insn (rtx);
/* Locate the proper template for the given insn-code. */
-extern const char *get_insn_template (int, rtx);
+extern const char *get_insn_template (int, rtx_insn *);
/* Functions in varasm.c. */
extern void decide_function_section (tree);
/* In emit-rtl.c */
-extern rtx_insn *emit_insn_before (rtx, rtx);
+extern rtx_insn *emit_insn_before (rtx, rtx_insn *);
extern rtx_insn *emit_insn_before_noloc (rtx, rtx_insn *, basic_block);
extern rtx_insn *emit_insn_before_setloc (rtx, rtx_insn *, location_t);
-extern rtx_jump_insn *emit_jump_insn_before (rtx, rtx);
+extern rtx_jump_insn *emit_jump_insn_before (rtx, rtx_insn *);
extern rtx_jump_insn *emit_jump_insn_before_noloc (rtx, rtx_insn *);
extern rtx_jump_insn *emit_jump_insn_before_setloc (rtx, rtx_insn *,
location_t);
extern rtx_insn *emit_call_insn_before_noloc (rtx, rtx_insn *);
extern rtx_insn *emit_call_insn_before_setloc (rtx, rtx_insn *, location_t);
extern rtx_insn *emit_debug_insn_before (rtx, rtx_insn *);
-extern rtx_insn *emit_debug_insn_before_noloc (rtx, rtx);
+extern rtx_insn *emit_debug_insn_before_noloc (rtx, rtx_insn *);
extern rtx_insn *emit_debug_insn_before_setloc (rtx, rtx_insn *, location_t);
extern rtx_barrier *emit_barrier_before (rtx_insn *);
extern rtx_code_label *emit_label_before (rtx_code_label *, rtx_insn *);
extern rtx_note *emit_note_before (enum insn_note, rtx_insn *);
-extern rtx_insn *emit_insn_after (rtx, rtx);
+extern rtx_insn *emit_insn_after (rtx, rtx_insn *);
extern rtx_insn *emit_insn_after_noloc (rtx, rtx_insn *, basic_block);
extern rtx_insn *emit_insn_after_setloc (rtx, rtx_insn *, location_t);
-extern rtx_jump_insn *emit_jump_insn_after (rtx, rtx);
+extern rtx_jump_insn *emit_jump_insn_after (rtx, rtx_insn *);
extern rtx_jump_insn *emit_jump_insn_after_noloc (rtx, rtx_insn *);
extern rtx_jump_insn *emit_jump_insn_after_setloc (rtx, rtx_insn *, location_t);
-extern rtx_insn *emit_call_insn_after (rtx, rtx);
+extern rtx_insn *emit_call_insn_after (rtx, rtx_insn *);
extern rtx_insn *emit_call_insn_after_noloc (rtx, rtx_insn *);
extern rtx_insn *emit_call_insn_after_setloc (rtx, rtx_insn *, location_t);
-extern rtx_insn *emit_debug_insn_after (rtx, rtx);
+extern rtx_insn *emit_debug_insn_after (rtx, rtx_insn *);
extern rtx_insn *emit_debug_insn_after_noloc (rtx, rtx_insn *);
extern rtx_insn *emit_debug_insn_after_setloc (rtx, rtx_insn *, location_t);
extern rtx_barrier *emit_barrier_after (rtx_insn *);
extern rtx set_for_reg_notes (rtx);
extern rtx set_unique_reg_note (rtx, enum reg_note, rtx);
extern rtx set_dst_reg_note (rtx, enum reg_note, rtx, rtx);
-extern void set_insn_deleted (rtx);
+extern void set_insn_deleted (rtx_insn *);
/* Functions in rtlanal.c */