From: Trevor Saunders Date: Wed, 2 Nov 2016 03:44:50 +0000 (+0000) Subject: use rtx_insn * in various places where it is obvious X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b2ea071ab12eb84e9be8631d64296bc5c0be7ae;p=gcc.git use rtx_insn * in various places where it is obvious gcc/ChangeLog: 2016-11-01 Trevor Saunders * 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. From-SVN: r241768 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a7b71dea6a..02d929f1185 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,30 @@ +2016-11-01 Trevor Saunders + + * 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 * tree-inline.c (copy_tree_body_r): Only copy the taken branch of diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index 2820de9ae8d..c66f13152ce 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -627,7 +627,7 @@ try_eliminate_compare (struct comparison *cmp) /* 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); diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 0e7b63dc6f7..b5f306cb055 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -4830,7 +4830,6 @@ static rtx 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 (); @@ -4847,7 +4846,7 @@ arc_emit_call_tls_get_addr (rtx sym, int reloc, rtx eqv) 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); diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index dd8d5e5db8c..5add0d6443b 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -7905,10 +7905,10 @@ load_tls_operand (rtx x, rtx reg) 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 (); @@ -7932,7 +7932,7 @@ arm_call_tls_get_addr (rtx x, rtx reg, rtx *valuep, int reloc) LCT_PURE, /* LCT_CONST? */ Pmode, 1, reg, Pmode); - insns = get_insns (); + rtx_insn *insns = get_insns (); end_sequence (); return insns; @@ -7964,7 +7964,8 @@ arm_tls_descseq_addr (rtx x, rtx reg) 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) diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 2dfd03865d9..5f0efd9b544 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -3432,7 +3432,8 @@ hwloop_optimize (hwloop_info loop) 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; @@ -3453,7 +3454,7 @@ hwloop_optimize (hwloop_info loop) 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; @@ -3977,7 +3978,7 @@ bfin_gen_bundles (void) 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)) { diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index f8c3d668dbe..6cb9185ca02 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -4856,7 +4856,7 @@ find_last_same_clock (rtx_insn *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 (); @@ -4878,7 +4878,7 @@ reorg_split_calls (rtx *call_labels) 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); @@ -5029,7 +5029,7 @@ reorg_split_calls (rtx *call_labels) scheduling was run earlier. */ static void -reorg_emit_nops (rtx *call_labels) +reorg_emit_nops (rtx_insn **call_labels) { bool first; rtx last_call; @@ -5921,7 +5921,6 @@ static void c6x_reorg (void) { basic_block bb; - rtx *call_labels; bool do_selsched = (c6x_flag_schedule_insns2 && flag_selective_scheduling2 && !maybe_skip_selective_scheduling ()); @@ -5967,7 +5966,7 @@ c6x_reorg (void) } 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); diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 50899a7e487..fb01685fb89 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -7594,7 +7594,7 @@ static void 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; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f70eb43c922..5bb6efa7388 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -20376,7 +20376,8 @@ ix86_split_idivmod (machine_mode mode, rtx operands[], 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); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 31a2267a0f8..85571571599 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -1803,7 +1803,7 @@ ia64_expand_compare (rtx *expr, rtx *op0, rtx *op1) }; int magic; enum rtx_code ncode; - rtx ret, insns; + rtx ret; gcc_assert (cmptf_libfunc && GET_MODE (*op1) == TFmode); switch (code) @@ -1842,7 +1842,7 @@ ia64_expand_compare (rtx *expr, rtx *op0, rtx *op1) 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, diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index ccd9675d3ba..6077201a3b0 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -3781,13 +3781,13 @@ m32c_prepare_shift (rtx * operands, int scale, int shift_code) 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); diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index dbbc4db1410..e61bf408d5a 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -3163,7 +3163,7 @@ mn10300_bundle_liw (void) 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; diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c index 5375e18dd95..30ce349ff57 100644 --- a/gcc/config/rl78/rl78.c +++ b/gcc/config/rl78/rl78.c @@ -2949,7 +2949,7 @@ move_to_acc (int opno, rtx before) } 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; diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 3554f339f3f..3f98cd820d5 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -4840,7 +4840,8 @@ s390_emit_tls_call_insn (rtx result_reg, rtx tls_call) 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)) @@ -13280,7 +13281,7 @@ static bool 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; @@ -13317,7 +13318,7 @@ s390_fix_long_loop_prediction (rtx_insn *insn) 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)), diff --git a/gcc/config/sh/sh-mem.cc b/gcc/config/sh/sh-mem.cc index 1773f1df4d3..b965aed1684 100644 --- a/gcc/config/sh/sh-mem.cc +++ b/gcc/config/sh/sh-mem.cc @@ -204,7 +204,7 @@ sh_expand_cmpstr (rtx *operands) 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 (); @@ -342,7 +342,7 @@ sh_expand_cmpnstr (rtx *operands) 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 (); @@ -583,7 +583,7 @@ sh_expand_strlen (rtx *operands) 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 (); @@ -669,7 +669,7 @@ sh_expand_setmem (rtx *operands) 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]); diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index e80ef581b2d..c6956a056b4 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -3044,7 +3044,7 @@ "&& 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)) { @@ -3105,7 +3105,7 @@ && ! 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 ())); } @@ -3174,7 +3174,7 @@ 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, @@ -3205,7 +3205,7 @@ && ! 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 ())); } @@ -4518,7 +4518,7 @@ "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]); @@ -4545,7 +4545,7 @@ "&& 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]); @@ -7456,7 +7456,7 @@ [(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]))); @@ -7467,7 +7467,7 @@ 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]); @@ -8825,7 +8825,7 @@ "&& 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]; diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 8afcfbec98a..a8516ebe84b 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -4813,7 +4813,7 @@ emit_pattern_before (rtx pattern, rtx uncast_before, bool skip_debug_insns, insnp, make_raw); else return emit_pattern_before_noloc (pattern, before, - insnp ? before : NULL_RTX, + insnp ? before : NULL_RTX, NULL, make_raw); } diff --git a/gcc/except.c b/gcc/except.c index f0a1be0099f..e811b56074d 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -909,7 +909,7 @@ assign_filter_values (void) 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; diff --git a/gcc/final.c b/gcc/final.c index 71dba7c0422..5709d0e2406 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -214,7 +214,7 @@ static void leaf_renumber_regs (rtx_insn *); 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); @@ -513,7 +513,7 @@ default_jump_align_max_skip (rtx_insn *insn ATTRIBUTE_UNUSED) #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))); diff --git a/gcc/jump.c b/gcc/jump.c index fafef05f5b2..b6828133cb3 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -62,7 +62,7 @@ static void init_label_info (rtx_insn *); 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 *); /* Worker for rebuild_jump_labels and rebuild_jump_labels_chain. */ @@ -1457,7 +1457,7 @@ redirect_target (rtx x) 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);