+2016-11-01 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type
+ of variables rtx_insn *.
+ * config/arm/arm.c (arm_call_tls_get_addr): Likewise.
+ (legitimize_tls_address): Likewise.
+ * config/bfin/bfin.c (hwloop_optimize): Likewise.
+ (bfin_gen_bundles): Likewise.
+ * config/c6x/c6x.c (reorg_split_calls): Likewise.
+ (c6x_reorg): Likewise.
+ * config/frv/frv.c (frv_reorder_packet): Likewise.
+ * config/i386/i386.c (ix86_split_idivmod): Likewise.
+ * config/ia64/ia64.c (ia64_expand_compare): Likewise.
+ * config/m32c/m32c.c (m32c_prepare_shift): Likewise.
+ * config/mn10300/mn10300.c: Likewise.
+ * config/rl78/rl78.c: Likewise.
+ * config/s390/s390.c (s390_fix_long_loop_prediction): Likewise.
+ * config/sh/sh-mem.cc (sh_expand_cmpstr): Likewise.
+ (sh_expand_cmpnstr): Likewise.
+ (sh_expand_strlen): Likewise.
+ (sh_expand_setmem): Likewise.
+ * config/sh/sh.md: Likewise.
+ * emit-rtl.c (emit_pattern_before): Likewise.
+ * except.c: Likewise.
+ * final.c: Likewise.
+ * jump.c: Likewise.
+
2016-11-01 Jason Merrill <jason@redhat.com>
* tree-inline.c (copy_tree_body_r): Only copy the taken branch of
/* We've reached PREV_CLOBBER without finding a modification of IN_A.
Validate that PREV_CLOBBER itself does in fact refer to IN_A. Do
recall that we've already validated the shape of PREV_CLOBBER. */
- rtx insn = cmp->prev_clobber;
+ rtx_insn *insn = cmp->prev_clobber;
x = XVECEXP (PATTERN (insn), 0, 0);
if (rtx_equal_p (SET_DEST (x), in_a))
cmp_src = SET_SRC (x);
arc_emit_call_tls_get_addr (rtx sym, int reloc, rtx eqv)
{
rtx r0 = gen_rtx_REG (Pmode, R0_REG);
- rtx insns;
rtx call_fusage = NULL_RTX;
start_sequence ();
RTL_PURE_CALL_P (call_insn) = 1;
add_function_usage_to (call_insn, call_fusage);
- insns = get_insns ();
+ rtx_insn *insns = get_insns ();
end_sequence ();
rtx dest = gen_reg_rtx (Pmode);
return reg;
}
-static rtx
+static rtx_insn *
arm_call_tls_get_addr (rtx x, rtx reg, rtx *valuep, int reloc)
{
- rtx insns, label, labelno, sum;
+ rtx label, labelno, sum;
gcc_assert (reloc != TLS_DESCSEQ);
start_sequence ();
LCT_PURE, /* LCT_CONST? */
Pmode, 1, reg, Pmode);
- insns = get_insns ();
+ rtx_insn *insns = get_insns ();
end_sequence ();
return insns;
rtx
legitimize_tls_address (rtx x, rtx reg)
{
- rtx dest, tp, label, labelno, sum, insns, ret, eqv, addend;
+ rtx dest, tp, label, labelno, sum, ret, eqv, addend;
+ rtx_insn *insns;
unsigned int model = SYMBOL_REF_TLS_MODEL (x);
switch (model)
basic_block bb;
rtx_insn *insn, *last_insn;
rtx loop_init, start_label, end_label;
- rtx iter_reg, scratchreg, scratch_init, scratch_init_insn;
+ rtx iter_reg, scratchreg, scratch_init;
+ rtx_insn *scratch_init_insn;
rtx lc_reg, lt_reg, lb_reg;
rtx seq_end;
rtx_insn *seq;
scratchreg = NULL_RTX;
scratch_init = iter_reg;
- scratch_init_insn = NULL_RTX;
+ scratch_init_insn = NULL;
if (!PREG_P (iter_reg) && loop->incoming_src)
{
basic_block bb_in = loop->incoming_src;
for (insn = BB_HEAD (bb);; insn = next)
{
int at_end;
- rtx delete_this = NULL_RTX;
+ rtx_insn *delete_this = NULL;
if (NONDEBUG_INSN_P (insn))
{
the SEQUENCEs that represent execute packets. */
static void
-reorg_split_calls (rtx *call_labels)
+reorg_split_calls (rtx_insn **call_labels)
{
unsigned int reservation_mask = 0;
rtx_insn *insn = get_insns ();
if (returning_call_p (insn))
{
- rtx label = gen_label_rtx ();
+ rtx_code_label *label = gen_label_rtx ();
rtx labelref = gen_rtx_LABEL_REF (Pmode, label);
rtx reg = gen_rtx_REG (SImode, RETURN_ADDR_REGNO);
scheduling was run earlier. */
static void
-reorg_emit_nops (rtx *call_labels)
+reorg_emit_nops (rtx_insn **call_labels)
{
bool first;
rtx last_call;
c6x_reorg (void)
{
basic_block bb;
- rtx *call_labels;
bool do_selsched = (c6x_flag_schedule_insns2 && flag_selective_scheduling2
&& !maybe_skip_selective_scheduling ());
}
sched_no_dce = false;
- call_labels = XCNEWVEC (rtx, get_max_uid () + 1);
+ rtx_insn **call_labels = XCNEWVEC (rtx_insn *, get_max_uid () + 1);
reorg_split_calls (call_labels);
frv_reorder_packet (void)
{
unsigned int cursor[NUM_GROUPS];
- rtx insns[ARRAY_SIZE (frv_unit_groups)];
+ rtx_insn *insns[ARRAY_SIZE (frv_unit_groups)];
unsigned int unit, to, from;
enum frv_insn_group group;
struct frv_packet_group *packet_group;
bool signed_p)
{
rtx_code_label *end_label, *qimode_label;
- rtx insn, div, mod;
+ rtx div, mod;
+ rtx_insn *insn;
rtx scratch, tmp0, tmp1, tmp2;
rtx (*gen_divmod4_1) (rtx, rtx, rtx, rtx);
rtx (*gen_zero_extend) (rtx, rtx);
};
int magic;
enum rtx_code ncode;
- rtx ret, insns;
+ rtx ret;
gcc_assert (cmptf_libfunc && GET_MODE (*op1) == TFmode);
switch (code)
emit_insn (gen_rtx_SET (cmp, gen_rtx_fmt_ee (ncode, BImode,
ret, const0_rtx)));
- insns = get_insns ();
+ rtx_insn *insns = get_insns ();
end_sequence ();
emit_libcall_block (insns, cmp, cmp,
undefined to skip one of the comparisons. */
rtx count;
- rtx label, tempvar;
+ rtx tempvar;
rtx_insn *insn;
emit_move_insn (operands[0], operands[1]);
count = temp;
- label = gen_label_rtx ();
+ rtx_code_label *label = gen_label_rtx ();
LABEL_NUSES (label) ++;
tempvar = gen_reg_rtx (mode);
Insert a SETLB insn just before LABEL. */
static void
-mn10300_insert_setlb_lcc (rtx label, rtx branch)
+mn10300_insert_setlb_lcc (rtx_insn *label, rtx branch)
{
rtx lcc, comparison, cmp_reg;
}
static void
-force_into_acc (rtx src, rtx before)
+force_into_acc (rtx src, rtx_insn *before)
{
machine_mode mode = GET_MODE (src);
rtx move;
static rtx
legitimize_tls_address (rtx addr, rtx reg)
{
- rtx new_rtx, tls_call, temp, base, r2, insn;
+ rtx new_rtx, tls_call, temp, base, r2;
+ rtx_insn *insn;
if (GET_CODE (addr) == SYMBOL_REF)
switch (tls_symbolic_operand (addr))
s390_fix_long_loop_prediction (rtx_insn *insn)
{
rtx set = single_set (insn);
- rtx code_label, label_ref, new_label;
+ rtx code_label, label_ref;
rtx_insn *uncond_jump;
rtx_insn *cur_insn;
rtx tmp;
if (!cur_insn || JUMP_P (cur_insn) || LABEL_P (cur_insn))
return false;
- new_label = gen_label_rtx ();
+ rtx_code_label *new_label = gen_label_rtx ();
uncond_jump = emit_jump_insn_after (
gen_rtx_SET (pc_rtx,
gen_rtx_LABEL_REF (VOIDmode, code_label)),
rtx tmp2 = gen_reg_rtx (SImode);
rtx tmp3 = gen_reg_rtx (SImode);
- rtx jump;
+ rtx_insn *jump;
rtx_code_label *L_return = gen_label_rtx ();
rtx_code_label *L_loop_byte = gen_label_rtx ();
rtx_code_label *L_end_loop_byte = gen_label_rtx ();
rtx tmp1 = gen_reg_rtx (SImode);
rtx tmp2 = gen_reg_rtx (SImode);
- rtx jump;
+ rtx_insn *jump;
rtx_code_label *L_return = gen_label_rtx ();
rtx_code_label *L_loop_byte = gen_label_rtx ();
rtx_code_label *L_end_loop_byte = gen_label_rtx ();
rtx_code_label *L_return = gen_label_rtx ();
rtx_code_label *L_loop_byte = gen_label_rtx ();
- rtx jump;
+ rtx_insn *jump;
rtx_code_label *L_loop_long = gen_label_rtx ();
rtx_code_label *L_end_loop_long = gen_label_rtx ();
rtx_code_label *L_loop_byte = gen_label_rtx ();
rtx_code_label *L_loop_word = gen_label_rtx ();
rtx_code_label *L_return = gen_label_rtx ();
- rtx jump;
+ rtx_insn *jump;
rtx dest = copy_rtx (operands[0]);
rtx dest_addr = copy_addr_to_reg (XEXP (dest, 0));
rtx val = force_reg (SImode, operands[2]);
"&& 1"
[(const_int 0)]
{
- rtx prev_set_t_insn = NULL_RTX;
+ rtx_insn *prev_set_t_insn = NULL;
if (!arith_reg_operand (operands[3], SImode))
{
&& ! reg_referenced_p (get_t_reg_rtx (),
PATTERN (prev_set_t_insn))))
{
- prev_set_t_insn = NULL_RTX;
+ prev_set_t_insn = NULL;
tmp_t_reg = gen_reg_rtx (SImode);
emit_insn (gen_move_insn (tmp_t_reg, get_t_reg_rtx ()));
}
if (INTVAL (operands[2]) > 1)
{
const rtx shift_count = GEN_INT (INTVAL (operands[2]) - 1);
- rtx prev_set_t_insn = NULL_RTX;
+ rtx_insn *prev_set_t_insn = NULL;
rtx tmp_t_reg = NULL_RTX;
/* If we're going to emit a shift sequence that clobbers the T_REG,
&& ! reg_referenced_p (get_t_reg_rtx (),
PATTERN (prev_set_t_insn))))
{
- prev_set_t_insn = NULL_RTX;
+ prev_set_t_insn = NULL;
tmp_t_reg = gen_reg_rtx (SImode);
emit_insn (gen_move_insn (tmp_t_reg, get_t_reg_rtx ()));
}
"TARGET_SH1 && ! TARGET_ZDCBRANCH"
[(const_int 0)]
{
- rtx skip_neg_label = gen_label_rtx ();
+ rtx_code_label *skip_neg_label = gen_label_rtx ();
emit_move_insn (operands[0], operands[1]);
"&& can_create_pseudo_p ()"
[(const_int 0)]
{
- rtx skip_neg_label = gen_label_rtx ();
+ rtx_code_label *skip_neg_label = gen_label_rtx ();
emit_move_insn (operands[0], operands[1]);
[(match_operand 0 "" "") (match_operand 1 "" "")]
""
{
- rtx gotoffsym, insn;
+ rtx gotoffsym;
rtx t = (!can_create_pseudo_p ()
? operands[0]
: gen_reg_rtx (GET_MODE (operands[0])));
gotoffsym = gen_sym2GOTOFF (operands[1]);
PUT_MODE (gotoffsym, Pmode);
emit_move_insn (t, gotoffsym);
- insn = emit_move_insn (operands[0], gen_rtx_PLUS (Pmode, t, picreg));
+ rtx_insn *insn = emit_move_insn (operands[0], gen_rtx_PLUS (Pmode, t, picreg));
set_unique_reg_note (insn, REG_EQUAL, operands[1]);
"&& 1"
[(const_int 0)]
{
- rtx skip_label = gen_label_rtx ();
+ rtx_code_label *skip_label = gen_label_rtx ();
emit_move_insn (operands[0], operands[1]);
rtx cmp_val = operands[2];
insnp, make_raw);
else
return emit_pattern_before_noloc (pattern, before,
- insnp ? before : NULL_RTX,
+ insnp ? before : NULL_RTX,
NULL, make_raw);
}
first instruction of some existing BB and return the newly
produced block. */
static basic_block
-emit_to_new_bb_before (rtx_insn *seq, rtx insn)
+emit_to_new_bb_before (rtx_insn *seq, rtx_insn *insn)
{
rtx_insn *last;
basic_block bb;
static int alter_cond (rtx);
#endif
#ifndef ADDR_VEC_ALIGN
-static int final_addr_vec_align (rtx);
+static int final_addr_vec_align (rtx_insn *);
#endif
static int align_fuzz (rtx, rtx, int, unsigned);
static void collect_fn_hard_reg_usage (void);
#ifndef ADDR_VEC_ALIGN
static int
-final_addr_vec_align (rtx addr_vec)
+final_addr_vec_align (rtx_insn *addr_vec)
{
int align = GET_MODE_SIZE (GET_MODE (PATTERN (addr_vec)));
static void mark_all_labels (rtx_insn *);
static void mark_jump_label_1 (rtx, rtx_insn *, bool, bool);
static void mark_jump_label_asm (rtx, rtx_insn *);
-static void redirect_exp_1 (rtx *, rtx, rtx, rtx);
+static void redirect_exp_1 (rtx *, rtx, rtx, rtx_insn *);
static int invert_exp_1 (rtx, rtx_insn *);
\f
/* Worker for rebuild_jump_labels and rebuild_jump_labels_chain. */
NLABEL as a return. Accrue modifications into the change group. */
static void
-redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx insn)
+redirect_exp_1 (rtx *loc, rtx olabel, rtx nlabel, rtx_insn *insn)
{
rtx x = *loc;
RTX_CODE code = GET_CODE (x);