https://gcc.gnu.org/g:043a79ac094e4c5078d12b22dc6a38ab624b1fbb
commit r17-5857-g043a79ac094e4c5078d12b22dc6a38ab624b1fbb Author: Trevor Saunders <[email protected]> Date: Sun Oct 25 05:51:57 2026 +0000 Use rtx_insn * and rtx_code_label * where the value already has that type gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_guard_switch_pstate_sm, aarch64_expand_prologue, aarch64_expand_epilogue, aarch64_switch_pstate_sm_for_landing_pad, aarch64_switch_pstate_sm_for_jump, aarch64_switch_pstate_sm_for_call): Use an rtx_code_label * for the guard label. (aarch64_expand_cpymem): Use an rtx_insn * for locals that only hold an insn. * config/arm/arm.cc (arm_add_cfa_adjust_cfa_note, cmse_nonsecure_call_inline_register_clear): Pass an rtx_insn * and use one for a local that already holds an insn. * config/bfin/bfin.cc (hwloop_optimize): Use an rtx_insn * for a local that only holds an insn. * config/c6x/c6x.cc (condjump_opposite_condition, duplicate_cond, reorg_emit_nops, try_rename_operands, hwloop_optimize): Pass an rtx_insn * and use one for a local that already holds an insn. * explow.cc (emit_stack_clash_protection_probe_loop_start, anti_adjust_stack_and_probe_stack_clash): Pass an rtx_code_label ** and use one for a local that only holds a label. * explow.h (emit_stack_clash_protection_probe_loop_start): Pass an rtx_code_label **. * haifa-sched.cc (move_insn): Pass an rtx_insn *. * optabs.cc (expand_compare_and_swap_loop): Likewise. (maybe_emit_compare_and_swap_exchange_loop): Pass nullptr. * config/i386/i386-features.cc (emit_conversion_insns): Pass an rtx_insn *. * config/i386/i386-features.h (emit_conversion_insns): Likewise. * config/ia64/ia64.cc (get_insn_spec_code, try_issue_insn): Likewise. * config/m68k/m68k.md (negdf2, negxf2, absdf2, absxf2): Use an rtx_insn * for a local that only holds an insn. * config/mips/mips.cc (mips_expand_prologue): Use an rtx_insn * for a local that only holds an insn. * config/pru/pru.md (cbranchdi4): Likewise. * config/riscv/riscv-string.cc (emit_strcmp_scalar_compare_byte, emit_strcmp_scalar_compare_subword, emit_strcmp_scalar_compare_word, emit_strcmp_scalar_load_and_compare, emit_memcmp_scalar_load_and_compare): Pass an rtx_code_label *. * config/rl78/rl78.cc (rl78_note_reg_uses, rl78_note_reg_set): Pass an rtx_insn *. * config/rs6000/rs6000-p8swap.cc (union_defs, union_uses, insn_is_load_p, insn_is_store_p, insn_is_swap_p, quad_aligned_load_p, quad_aligned_store_p, swap_feeds_both_load_and_store, const_load_sequence_p, insn_is_swappable_p, chain_contains_only_swaps, mark_swaps_for_removal, replace_swapped_aligned_load, replace_swapped_load_constant, rs6000_analyze_swaps): Pass an rtx_insn * and use one for locals that already hold an insn. * config/rs6000/rs6000.cc (is_load_insn, is_store_insn, rs6000_is_costly_dependence, is_costly_group): Likewise. * config/rs6000/rs6000-string.cc (do_ifelse, expand_cmp_vec_sequence, expand_strncmp_gpr_sequence, expand_block_compare, expand_strn_compare): Pass an rtx_code_label * and use one for locals that only hold a label. * config/rs6000/rs6000.md (allocate_stack): Use an rtx_code_label * for a local that only holds a label. * config/s390/s390.cc (s390_emit_tls_call_insn, s390_expand_tbegin): Use an rtx_insn * for a local that only holds an insn. * config/sh/sh.cc (sh_expand_prologue, sh_reorg): Use an rtx_code_label * for a local that only holds a label. * config/sh/sh.md (symGOT2reg, symGOTFUNCDESC2reg, sibcall_pcrel_fdpic, sibcall_value_pcrel, sibcall_value_pcrel_fdpic): Use an rtx_insn * for a local that only holds an insn. * config/sh/sh_treg_combine.cc (touched_insn, try_combine_comparisons): Pass and return an rtx_insn *, and use one for a local that already holds an insn. Diff: --- gcc/config/aarch64/aarch64.cc | 20 +++++++-------- gcc/config/arm/arm.cc | 8 +++--- gcc/config/bfin/bfin.cc | 3 ++- gcc/config/c6x/c6x.cc | 10 ++++---- gcc/config/i386/i386-features.cc | 2 +- gcc/config/i386/i386-features.h | 2 +- gcc/config/ia64/ia64.cc | 6 ++--- gcc/config/m68k/m68k.md | 12 +++------ gcc/config/mips/mips.cc | 4 ++- gcc/config/pru/pru.md | 2 +- gcc/config/riscv/riscv-string.cc | 15 ++++++----- gcc/config/rl78/rl78.cc | 4 +-- gcc/config/rs6000/rs6000-p8swap.cc | 52 +++++++++++++++++++------------------- gcc/config/rs6000/rs6000-string.cc | 25 ++++++++++-------- gcc/config/rs6000/rs6000.cc | 16 +++++------- gcc/config/rs6000/rs6000.md | 2 +- gcc/config/s390/s390.cc | 4 +-- gcc/config/sh/sh.cc | 6 ++--- gcc/config/sh/sh.md | 29 +++++++++++---------- gcc/config/sh/sh_treg_combine.cc | 8 +++--- gcc/explow.cc | 6 ++--- gcc/explow.h | 6 +++-- gcc/haifa-sched.cc | 2 +- gcc/optabs.cc | 4 +-- 24 files changed, 128 insertions(+), 120 deletions(-) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 5232c6a6d696..6c1229d0a959 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -5907,7 +5907,7 @@ aarch64_sub_sp (rtx temp1, rtx temp2, poly_int64 delta, Emit instructions to branch around the mode switch if PSTATE.SM already matches LOCAL_MODE. Return the label that the branch jumps to. */ -static rtx_insn * +static rtx_code_label * aarch64_guard_switch_pstate_sm (rtx old_svcr, aarch64_isa_mode local_mode) { local_mode &= AARCH64_ISA_MODE_SM_STATE; @@ -10717,7 +10717,7 @@ aarch64_read_old_svcr (unsigned int regno) load the incoming value of SVCR from its save slot into temporary register REGNO. */ -static rtx_insn * +static rtx_code_label * aarch64_guard_switch_pstate_sm (unsigned int regno, aarch64_isa_mode local_mode) { @@ -11023,7 +11023,7 @@ aarch64_expand_prologue (void) /* Enable PSTATE.SM, if required. */ if (aarch64_cfun_enables_pstate_sm ()) { - rtx_insn *guard_label = nullptr; + rtx_code_label *guard_label = nullptr; if (known_ge (cfun->machine->frame.old_svcr_offset, 0)) { /* The current function is streaming-compatible. Save the @@ -11137,7 +11137,7 @@ aarch64_expand_epilogue (rtx_call_insn *sibcall) /* Reset PSTATE.SM, if required. */ if (aarch64_cfun_enables_pstate_sm ()) { - rtx_insn *guard_label = nullptr; + rtx_code_label *guard_label = nullptr; if (known_ge (cfun->machine->frame.old_svcr_offset, 0)) guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, AARCH64_ISA_MODE); @@ -29640,8 +29640,8 @@ aarch64_expand_cpymem (rtx *operands, bool is_memmove) mode = V4SImode; rtx reg = gen_reg_rtx (mode); - rtx load = gen_move_insn (reg, adjust_address (src, mode, offset)); - rtx store = gen_move_insn (adjust_address (dst, mode, offset), reg); + rtx_insn *load = gen_move_insn (reg, adjust_address (src, mode, offset)); + rtx_insn *store = gen_move_insn (adjust_address (dst, mode, offset), reg); ops.safe_push ({ load, store }); size -= mode_bytes; offset += mode_bytes; @@ -33572,7 +33572,7 @@ aarch64_switch_pstate_sm_for_landing_pad (basic_block bb) return false; start_sequence (); - rtx_insn *guard_label = nullptr; + rtx_code_label *guard_label = nullptr; if (TARGET_STREAMING_COMPATIBLE) guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, AARCH64_ISA_MODE_SM_OFF); @@ -33599,7 +33599,7 @@ aarch64_switch_pstate_sm_for_jump (rtx_insn *jump) return false; start_sequence (); - rtx_insn *guard_label = nullptr; + rtx_code_label *guard_label = nullptr; if (TARGET_STREAMING_COMPATIBLE) guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, AARCH64_ISA_MODE_SM_OFF); @@ -33629,7 +33629,7 @@ aarch64_switch_pstate_sm_for_call (rtx_call_insn *call) /* Switch mode before the call, preserving any argument registers across the switch. */ start_sequence (); - rtx_insn *args_guard_label = nullptr; + rtx_code_label *args_guard_label = nullptr; if (TARGET_STREAMING_COMPATIBLE) args_guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, callee_isa_mode); @@ -33649,7 +33649,7 @@ aarch64_switch_pstate_sm_for_call (rtx_call_insn *call) /* Switch mode after the call, preserving any return registers across the switch. */ start_sequence (); - rtx_insn *return_guard_label = nullptr; + rtx_code_label *return_guard_label = nullptr; if (TARGET_STREAMING_COMPATIBLE) return_guard_label = aarch64_guard_switch_pstate_sm (IP0_REGNUM, callee_isa_mode); diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 2df966d129fc..4fc589a5ae75 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -172,7 +172,7 @@ static int arm_register_move_cost (machine_mode, reg_class_t, reg_class_t); static int arm_memory_move_cost (machine_mode, reg_class_t, bool); static void emit_constant_insn (rtx cond, rtx pattern); static rtx_insn *emit_set_insn (rtx, rtx); -static void arm_add_cfa_adjust_cfa_note (rtx, int, rtx, rtx); +static void arm_add_cfa_adjust_cfa_note (rtx_insn *, int, rtx, rtx); static rtx_insn *emit_multi_reg_push (unsigned long, unsigned long); static void arm_emit_multi_reg_pop (unsigned long); static int vfp_emit_fstmd (int, int); @@ -18374,8 +18374,8 @@ cmse_nonsecure_call_inline_register_clear (void) if (clear_callee_saved) { - rtx push_insn = - emit_multi_reg_push (callee_saved_mask, callee_saved_mask); + rtx_insn *push_insn + = emit_multi_reg_push (callee_saved_mask, callee_saved_mask); /* Disable frame debug info in push because it needs to be disabled for pop (see below). */ RTX_FRAME_RELATED_P (push_insn) = 0; @@ -21508,7 +21508,7 @@ emit_multi_reg_push (unsigned long mask, unsigned long dwarf_regs_mask) SIZE is the offset to be adjusted. DEST and SRC might be stack_pointer_rtx or hard_frame_pointer_rtx. */ static void -arm_add_cfa_adjust_cfa_note (rtx insn, int size, rtx dest, rtx src) +arm_add_cfa_adjust_cfa_note (rtx_insn *insn, int size, rtx dest, rtx src) { rtx dwarf; diff --git a/gcc/config/bfin/bfin.cc b/gcc/config/bfin/bfin.cc index f81114b0bf5e..015ba054029f 100644 --- a/gcc/config/bfin/bfin.cc +++ b/gcc/config/bfin/bfin.cc @@ -3452,7 +3452,8 @@ hwloop_optimize (hwloop_info loop) { basic_block bb; rtx_insn *insn, *last_insn; - rtx loop_init, start_label; + rtx loop_init; + rtx_insn *start_label; rtx iter_reg, scratchreg, scratch_init; rtx_insn *scratch_init_insn; rtx lc_reg, lt_reg, lb_reg; diff --git a/gcc/config/c6x/c6x.cc b/gcc/config/c6x/c6x.cc index 6eae45d7d126..2480abdb3969 100644 --- a/gcc/config/c6x/c6x.cc +++ b/gcc/config/c6x/c6x.cc @@ -3400,7 +3400,7 @@ get_unit_operand_masks (rtx_insn *insn, unsigned int *pmask1, it only if we managed to improve the balance. */ static void try_rename_operands (rtx_insn *head, rtx_insn *tail, unit_req_table reqs, - rtx insn, + rtx_insn *insn, insn_rr_info *info, unsigned int op_mask, int orig_side) { enum reg_class super_class = orig_side == 0 ? B_REGS : A_REGS; @@ -3726,7 +3726,7 @@ insn_get_clock (rtx insn) the opposite of the condition in which it branches. Otherwise, return NULL_RTX. */ static rtx -condjump_opposite_condition (rtx insn) +condjump_opposite_condition (rtx_insn *insn) { rtx pat = PATTERN (insn); int icode = INSN_CODE (insn); @@ -4786,7 +4786,7 @@ find_next_cycle_insn (rtx_insn *insn, int clock) around PAT. Return PAT either unchanged or modified in this way. */ static rtx -duplicate_cond (rtx pat, rtx cond_insn) +duplicate_cond (rtx pat, rtx_insn *cond_insn) { rtx cond_pat = PATTERN (cond_insn); if (GET_CODE (cond_pat) == COND_EXEC) @@ -5044,7 +5044,7 @@ reorg_emit_nops (rtx_code_label **call_labels) cycles -= prev_implicit_nops; if (cycles > 1) { - rtx nop = emit_nop_after (cycles - 1, prev); + rtx_insn *nop = emit_nop_after (cycles - 1, prev); insn_set_clock (nop, prev_clock + prev_implicit_nops + 1); } } @@ -5671,7 +5671,7 @@ hwloop_optimize (hwloop_info loop) for (i = 0; i < n_real_insns; i++) { - rtx insn = insn_copies[0][i]; + rtx_insn *insn = insn_copies[0][i]; int uid = INSN_UID (insn); int stage = insn_uid_get_clock (uid) / sp_ii; diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index 430e2b910e50..e4b34123a726 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -914,7 +914,7 @@ general_scalar_chain::compute_convert_gain () instruction has EH region attached. */ void -scalar_chain::emit_conversion_insns (rtx insns, rtx_insn *after) +scalar_chain::emit_conversion_insns (rtx_insn *insns, rtx_insn *after) { if (!control_flow_insn_p (after)) { diff --git a/gcc/config/i386/i386-features.h b/gcc/config/i386/i386-features.h index febcf62e72d1..61b2393b7ead 100644 --- a/gcc/config/i386/i386-features.h +++ b/gcc/config/i386/i386-features.h @@ -164,7 +164,7 @@ class scalar_chain protected: void add_to_queue (unsigned insn_uid); - void emit_conversion_insns (rtx insns, rtx_insn *pos); + void emit_conversion_insns (rtx_insn *insns, rtx_insn *pos); rtx convert_compare (rtx op1, rtx op2, rtx_insn *insn); void mark_dual_mode_def (df_ref def); void convert_reg (rtx_insn *insn, rtx dst, rtx src); diff --git a/gcc/config/ia64/ia64.cc b/gcc/config/ia64/ia64.cc index e2e00348bdc9..9ed9118b435f 100644 --- a/gcc/config/ia64/ia64.cc +++ b/gcc/config/ia64/ia64.cc @@ -266,7 +266,7 @@ static int insert_bundle_state (struct bundle_state *); static void initiate_bundle_state_table (void); static void finish_bundle_state_table (void); static int try_issue_nops (struct bundle_state *, int); -static int try_issue_insn (struct bundle_state *, rtx); +static int try_issue_insn (struct bundle_state *, rtx_insn *); static void issue_nops_and_insn (struct bundle_state *, int, rtx_insn *, int, int); static int get_max_pos (state_t); @@ -8257,7 +8257,7 @@ ia64_skip_rtx_p (const_rtx x) /* If INSN is a speculative load, return its UNSPEC code. Return -1 otherwise. */ static int -get_insn_spec_code (const_rtx insn) +get_insn_spec_code (const rtx_insn *insn) { rtx pat, reg, mem; @@ -8849,7 +8849,7 @@ try_issue_nops (struct bundle_state *curr_state, int nops_num) function returns FALSE and frees the current state. */ static int -try_issue_insn (struct bundle_state *curr_state, rtx insn) +try_issue_insn (struct bundle_state *curr_state, rtx_insn *insn) { if (insn && state_transition (curr_state->dfa_state, insn) >= 0) { diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index 227399feeee4..be7a28cc7c52 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -4085,7 +4085,6 @@ { rtx result; rtx target; - rtx insns; start_sequence (); target = operand_subword (operands[0], 0, 1, DFmode); @@ -4100,7 +4099,7 @@ emit_move_insn (operand_subword (operands[0], 1, 1, DFmode), operand_subword_force (operands[1], 1, DFmode)); - insns = end_sequence (); + rtx_insn *insns = end_sequence (); emit_insn (insns); DONE; @@ -4116,7 +4115,6 @@ { rtx result; rtx target; - rtx insns; start_sequence (); target = operand_subword (operands[0], 0, 1, XFmode); @@ -4133,7 +4131,7 @@ emit_move_insn (operand_subword (operands[0], 2, 1, XFmode), operand_subword_force (operands[1], 2, XFmode)); - insns = end_sequence (); + rtx_insn *insns = end_sequence (); emit_insn (insns); DONE; @@ -4236,7 +4234,6 @@ { rtx result; rtx target; - rtx insns; start_sequence (); target = operand_subword (operands[0], 0, 1, DFmode); @@ -4251,7 +4248,7 @@ emit_move_insn (operand_subword (operands[0], 1, 1, DFmode), operand_subword_force (operands[1], 1, DFmode)); - insns = end_sequence (); + rtx_insn *insns = end_sequence (); emit_insn (insns); DONE; @@ -4267,7 +4264,6 @@ { rtx result; rtx target; - rtx insns; start_sequence (); target = operand_subword (operands[0], 0, 1, XFmode); @@ -4284,7 +4280,7 @@ emit_move_insn (operand_subword (operands[0], 2, 1, XFmode), operand_subword_force (operands[1], 2, XFmode)); - insns = end_sequence (); + rtx_insn *insns = end_sequence (); emit_insn (insns); DONE; diff --git a/gcc/config/mips/mips.cc b/gcc/config/mips/mips.cc index 3136eca06760..84fac7f2bdb0 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -12846,7 +12846,9 @@ mips_expand_prologue (void) offset = frame->hard_frame_pointer_offset; if (offset == 0) { - rtx insn = mips_emit_move (hard_frame_pointer_rtx, stack_pointer_rtx); + rtx_insn *insn + = mips_emit_move (hard_frame_pointer_rtx, + stack_pointer_rtx); RTX_FRAME_RELATED_P (insn) = 1; } else if (SMALL_OPERAND (offset)) diff --git a/gcc/config/pru/pru.md b/gcc/config/pru/pru.md index 0487409326ed..23df113fb8bb 100644 --- a/gcc/config/pru/pru.md +++ b/gcc/config/pru/pru.md @@ -1620,7 +1620,7 @@ rtx op1_hi = simplify_gen_subreg (SImode, operands[1], DImode, 4); rtx op2_lo = simplify_gen_subreg (SImode, operands[2], DImode, 0); rtx op2_hi = simplify_gen_subreg (SImode, operands[2], DImode, 4); - rtx j; + rtx_insn *j; if (code == EQ) { diff --git a/gcc/config/riscv/riscv-string.cc b/gcc/config/riscv/riscv-string.cc index 985aecb4768e..67aaae7c1e41 100644 --- a/gcc/config/riscv/riscv-string.cc +++ b/gcc/config/riscv/riscv-string.cc @@ -138,7 +138,7 @@ do_load_from_addr (machine_mode mode, rtx dest, rtx addr_reg, rtx addr) static void emit_strcmp_scalar_compare_byte (rtx result, rtx data1, rtx data2, - rtx final_label) + rtx_code_label *final_label) { do_sub3 (result, data1, data2); emit_jump_insn (gen_jump (final_label)); @@ -156,7 +156,7 @@ emit_strcmp_scalar_compare_byte (rtx result, rtx data1, rtx data2, static void emit_strcmp_scalar_compare_subword (rtx data1, rtx data2, rtx orc1, unsigned HOST_WIDE_INT cmp_bytes, - rtx end_label) + rtx_code_label *end_label) { /* Set a NUL-byte after the relevant data (behind the string). */ long long im = -256ll; @@ -186,7 +186,8 @@ emit_strcmp_scalar_compare_subword (rtx data1, rtx data2, rtx orc1, static void emit_strcmp_scalar_compare_word (rtx data1, rtx data2, rtx orc1, rtx testval, - rtx end_label, rtx nonul_end_label) + rtx_code_label *end_label, + rtx_code_label *nonul_end_label) { /* Check if data1 contains a NUL character. */ if (TARGET_ZBB) @@ -221,8 +222,9 @@ static void emit_strcmp_scalar_load_and_compare (rtx result, rtx src1, rtx src2, unsigned HOST_WIDE_INT nbytes, rtx data1, rtx data2, rtx orc1, - rtx end_label, rtx nonul_end_label, - rtx final_label) + rtx_code_label *end_label, + rtx_code_label *nonul_end_label, + rtx_code_label *final_label) { const unsigned HOST_WIDE_INT xlen = GET_MODE_SIZE (Xmode); unsigned HOST_WIDE_INT offset = 0; @@ -635,7 +637,8 @@ static void emit_memcmp_scalar_load_and_compare (rtx result, rtx src1, rtx src2, unsigned HOST_WIDE_INT nbytes, rtx data1, rtx data2, - rtx diff_label, rtx final_label) + rtx_code_label *diff_label, + rtx_code_label *final_label) { const unsigned HOST_WIDE_INT xlen = GET_MODE_SIZE (Xmode); unsigned HOST_WIDE_INT offset = 0; diff --git a/gcc/config/rl78/rl78.cc b/gcc/config/rl78/rl78.cc index dffb06095d23..56976aab3535 100644 --- a/gcc/config/rl78/rl78.cc +++ b/gcc/config/rl78/rl78.cc @@ -3822,7 +3822,7 @@ rl78_alloc_physical_registers (void) encounter when scanning backwards) triggers a REG_DEAD note if the reg was previously in DEAD[]. */ static void -rl78_note_reg_uses (char *dead, rtx s, rtx insn) +rl78_note_reg_uses (char *dead, rtx s, rtx_insn *insn) { const char *fmt; int i, r; @@ -3884,7 +3884,7 @@ rl78_note_reg_uses (char *dead, rtx s, rtx insn) /* Like the previous function, but scan for SETs instead. */ static void -rl78_note_reg_set (char *dead, rtx d, rtx insn) +rl78_note_reg_set (char *dead, rtx d, rtx_insn *insn) { int r, i; bool is_dead; diff --git a/gcc/config/rs6000/rs6000-p8swap.cc b/gcc/config/rs6000/rs6000-p8swap.cc index 046207e73f64..de1cf8596f2e 100644 --- a/gcc/config/rs6000/rs6000-p8swap.cc +++ b/gcc/config/rs6000/rs6000-p8swap.cc @@ -206,7 +206,7 @@ enum special_handling_values { /* Union INSN with all insns containing definitions that reach USE. Detect whether USE is live-in to the current function. */ static void -union_defs (swap_web_entry *insn_entry, rtx insn, df_ref use) +union_defs (swap_web_entry *insn_entry, rtx_insn *insn, df_ref use) { struct df_link *link = DF_REF_CHAIN (use); @@ -220,7 +220,7 @@ union_defs (swap_web_entry *insn_entry, rtx insn, df_ref use) if (DF_REF_INSN_INFO (link->ref)) { - rtx def_insn = DF_REF_INSN (link->ref); + rtx_insn *def_insn = DF_REF_INSN (link->ref); gcc_assert (NONDEBUG_INSN_P (def_insn)); unionfind_union (insn_entry + INSN_UID (insn), insn_entry + INSN_UID (def_insn)); @@ -233,7 +233,7 @@ union_defs (swap_web_entry *insn_entry, rtx insn, df_ref use) /* Union INSN with all insns containing uses reached from DEF. Detect whether DEF is live-out from the current function. */ static void -union_uses (swap_web_entry *insn_entry, rtx insn, df_ref def) +union_uses (swap_web_entry *insn_entry, rtx_insn *insn, df_ref def) { struct df_link *link = DF_REF_CHAIN (def); @@ -249,7 +249,7 @@ union_uses (swap_web_entry *insn_entry, rtx insn, df_ref def) if (DF_REF_INSN_INFO (link->ref)) { - rtx use_insn = DF_REF_INSN (link->ref); + rtx_insn *use_insn = DF_REF_INSN (link->ref); if (NONDEBUG_INSN_P (use_insn)) unionfind_union (insn_entry + INSN_UID (insn), insn_entry + INSN_UID (use_insn)); @@ -277,7 +277,7 @@ pattern_is_rotate64 (rtx pat) /* Return 1 iff INSN is a load insn, including permuting loads that represent an lvxd2x instruction; else return 0. */ static unsigned int -insn_is_load_p (rtx insn) +insn_is_load_p (rtx_insn *insn) { rtx body = PATTERN (insn); @@ -310,7 +310,7 @@ insn_is_load_p (rtx insn) /* Return 1 iff INSN is a store insn, including permuting stores that represent an stvxd2x instruction; else return 0. */ static unsigned int -insn_is_store_p (rtx insn) +insn_is_store_p (rtx_insn *insn) { rtx body = PATTERN (insn); if (GET_CODE (body) == SET && MEM_P (SET_DEST (body))) @@ -326,7 +326,7 @@ insn_is_store_p (rtx insn) /* Return 1 iff INSN swaps doublewords. This may be a reg-reg swap, a permuting load, or a permuting store. */ static unsigned int -insn_is_swap_p (rtx insn) +insn_is_swap_p (rtx_insn *insn) { rtx body = PATTERN (insn); if (GET_CODE (body) != SET) @@ -410,7 +410,7 @@ quad_aligned_load_p (swap_web_entry *insn_entry, rtx_insn *insn) || def_link->next) return false; - rtx def_insn = DF_REF_INSN (def_link->ref); + rtx_insn *def_insn = DF_REF_INSN (def_link->ref); unsigned uid2 = INSN_UID (def_insn); /* We're looking for a load-with-swap insn. If this is not that, return false. */ @@ -469,7 +469,7 @@ quad_aligned_store_p (swap_web_entry *insn_entry, rtx_insn *insn) || def_link->next) return false; - rtx def_insn = DF_REF_INSN (def_link->ref); + rtx_insn *def_insn = DF_REF_INSN (def_link->ref); unsigned uid2 = INSN_UID (def_insn); /* If this source value is not a simple swap, return false */ @@ -499,7 +499,7 @@ quad_aligned_store_p (swap_web_entry *insn_entry, rtx_insn *insn) static unsigned int swap_feeds_both_load_and_store (swap_web_entry *insn_entry) { - rtx insn = insn_entry->insn; + rtx_insn *insn = insn_entry->insn; struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); df_ref def, use; struct df_link *link = 0; @@ -528,7 +528,7 @@ swap_feeds_both_load_and_store (swap_web_entry *insn_entry) /* Return TRUE if insn is a swap fed by a load from the constant pool. */ static bool -const_load_sequence_p (swap_web_entry *insn_entry, rtx insn) +const_load_sequence_p (swap_web_entry *insn_entry, rtx_insn *insn) { unsigned uid = INSN_UID (insn); if (!insn_entry[uid].is_swap || insn_entry[uid].is_load) @@ -551,7 +551,7 @@ const_load_sequence_p (swap_web_entry *insn_entry, rtx insn) || def_link->next) return false; - rtx def_insn = DF_REF_INSN (def_link->ref); + rtx_insn *def_insn = DF_REF_INSN (def_link->ref); unsigned uid2 = INSN_UID (def_insn); /* If this is not a load or is not a swap, return false. */ if (!insn_entry[uid2].is_load || !insn_entry[uid2].is_swap) @@ -594,7 +594,7 @@ const_load_sequence_p (swap_web_entry *insn_entry, rtx insn) if (DF_REF_IS_ARTIFICIAL (base_def_link->ref)) return false; - rtx tocrel_insn = DF_REF_INSN (base_def_link->ref); + rtx_insn *tocrel_insn = DF_REF_INSN (base_def_link->ref); rtx tocrel_body = PATTERN (tocrel_insn); rtx base, offset; if (GET_CODE (tocrel_body) != SET) @@ -871,7 +871,7 @@ rtx_is_swappable_p (rtx op, unsigned int *special) if vector doublewords are swapped in memory (in which case *SPECIAL is changed to a value indicating how). */ static unsigned int -insn_is_swappable_p (swap_web_entry *insn_entry, rtx insn, +insn_is_swappable_p (swap_web_entry *insn_entry, rtx_insn *insn, unsigned int *special) { /* Calls are always bad. */ @@ -945,7 +945,7 @@ insn_is_swappable_p (swap_web_entry *insn_entry, rtx insn, return 0; for (; link; link = link->next) { - rtx use_insn = DF_REF_INSN (link->ref); + rtx_insn *use_insn = DF_REF_INSN (link->ref); rtx use_body = PATTERN (use_insn); if (GET_CODE (use_body) != SET || GET_CODE (SET_SRC (use_body)) != UNSPEC @@ -1031,7 +1031,7 @@ chain_contains_only_swaps (swap_web_entry *insn_entry, struct df_link *link, if (DF_REF_IS_ARTIFICIAL (link->ref)) return false; - rtx reached_insn = DF_REF_INSN (link->ref); + rtx_insn *reached_insn = DF_REF_INSN (link->ref); unsigned uid = INSN_UID (reached_insn); struct df_insn_info *insn_info = DF_INSN_INFO_GET (reached_insn); @@ -1051,7 +1051,7 @@ chain_contains_only_swaps (swap_web_entry *insn_entry, struct df_link *link, if (DF_REF_IS_ARTIFICIAL (link->ref)) return false; - rtx swap_def_insn = DF_REF_INSN (swap_link->ref); + rtx_insn *swap_def_insn = DF_REF_INSN (swap_link->ref); unsigned uid2 = INSN_UID (swap_def_insn); /* Only permuting loads are allowed. */ @@ -1074,7 +1074,7 @@ chain_contains_only_swaps (swap_web_entry *insn_entry, struct df_link *link, if (DF_REF_IS_ARTIFICIAL (link->ref)) return false; - rtx swap_use_insn = DF_REF_INSN (swap_link->ref); + rtx_insn *swap_use_insn = DF_REF_INSN (swap_link->ref); unsigned uid2 = INSN_UID (swap_use_insn); /* Permuting stores or register swaps are allowed. */ @@ -1097,7 +1097,7 @@ chain_contains_only_swaps (swap_web_entry *insn_entry, struct df_link *link, static void mark_swaps_for_removal (swap_web_entry *insn_entry, unsigned int i) { - rtx insn = insn_entry[i].insn; + rtx_insn *insn = insn_entry[i].insn; struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); if (insn_entry[i].is_load) @@ -1111,7 +1111,7 @@ mark_swaps_for_removal (swap_web_entry *insn_entry, unsigned int i) them confidently. */ while (link) { - rtx use_insn = DF_REF_INSN (link->ref); + rtx_insn *use_insn = DF_REF_INSN (link->ref); insn_entry[INSN_UID (use_insn)].will_delete = 1; link = link->next; } @@ -1133,7 +1133,7 @@ mark_swaps_for_removal (swap_web_entry *insn_entry, unsigned int i) them confidently. */ while (link) { - rtx def_insn = DF_REF_INSN (link->ref); + rtx_insn *def_insn = DF_REF_INSN (link->ref); insn_entry[INSN_UID (def_insn)].will_delete = 1; link = link->next; } @@ -1749,7 +1749,7 @@ rs6000_gen_lvx (enum machine_mode mode, rtx dest_exp, rtx src_exp) load-with-swap, replace the load with an aligned load (without swap) and replace the swap with a copy insn. */ static void -replace_swapped_aligned_load (swap_web_entry *insn_entry, rtx swap_insn) +replace_swapped_aligned_load (swap_web_entry *insn_entry, rtx_insn *swap_insn) { /* Find the load. */ unsigned uid = INSN_UID (swap_insn); @@ -1866,7 +1866,7 @@ replace_swapped_aligned_load (swap_web_entry *insn_entry, rtx swap_insn) A better solution is to fix the code generator to emit lvx/stvx for those. */ static void -replace_swapped_load_constant (swap_web_entry *insn_entry, rtx swap_insn) +replace_swapped_load_constant (swap_web_entry *insn_entry, rtx_insn *swap_insn) { /* Find the load. */ struct df_insn_info *insn_info = DF_INSN_INFO_GET (swap_insn); @@ -2476,7 +2476,7 @@ rs6000_analyze_swaps (function *fun) use. */ if (mode == DImode && DF_REF_INSN_INFO (mention)) { - rtx feeder = DF_REF_INSN (mention); + rtx_insn *feeder = DF_REF_INSN (mention); /* FIXME: It is pretty hard to get from the df mention to the mode of the use in the insn. We arbitrarily pick a vector mode here, even though the use might @@ -2602,7 +2602,7 @@ rs6000_analyze_swaps (function *fun) by a register swap, the optimization isn't appropriate. */ else if (insn_entry[i].is_load && insn_entry[i].is_swap) { - rtx insn = insn_entry[i].insn; + rtx_insn *insn = insn_entry[i].insn; struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); df_ref def; @@ -2619,7 +2619,7 @@ rs6000_analyze_swaps (function *fun) } else if (insn_entry[i].is_store && insn_entry[i].is_swap) { - rtx insn = insn_entry[i].insn; + rtx_insn *insn = insn_entry[i].insn; struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); df_ref use; diff --git a/gcc/config/rs6000/rs6000-string.cc b/gcc/config/rs6000/rs6000-string.cc index 2f49b94c3d1b..0fc4d6d30654 100644 --- a/gcc/config/rs6000/rs6000-string.cc +++ b/gcc/config/rs6000/rs6000-string.cc @@ -380,7 +380,8 @@ do_load_for_compare_from_addr (machine_mode mode, rtx dest, rtx addr, static void do_ifelse (machine_mode cmpmode, rtx_code comparison, - rtx a, rtx b, rtx cr, rtx true_label, profile_probability br_prob) + rtx a, rtx b, rtx cr, + rtx_code_label *true_label, profile_probability br_prob) { gcc_assert ((a == NULL_RTX && b == NULL_RTX && cr != NULL_RTX) || (a != NULL_RTX && b != NULL_RTX)); @@ -645,8 +646,9 @@ expand_cmp_vec_sequence (unsigned HOST_WIDE_INT bytes_to_compare, rtx orig_src1, rtx orig_src2, rtx s1addr, rtx s2addr, rtx off_reg, rtx s1data, rtx s2data, rtx vec_result, - bool equality_compare_rest, rtx *p_cleanup_label, - rtx final_move_label, bool checkzero) + bool equality_compare_rest, + rtx_code_label **p_cleanup_label, + rtx_code_label *final_move_label, bool checkzero) { machine_mode load_mode; unsigned int load_mode_size; @@ -655,7 +657,7 @@ expand_cmp_vec_sequence (unsigned HOST_WIDE_INT bytes_to_compare, rtx zero_reg = NULL; gcc_assert (p_cleanup_label != NULL); - rtx cleanup_label = *p_cleanup_label; + rtx_code_label *cleanup_label = *p_cleanup_label; emit_move_insn (s1addr, force_reg (Pmode, XEXP (orig_src1, 0))); emit_move_insn (s2addr, force_reg (Pmode, XEXP (orig_src2, 0))); @@ -752,7 +754,7 @@ expand_cmp_vec_sequence (unsigned HOST_WIDE_INT bytes_to_compare, bool branch_to_cleanup = (remain > 0 || equality_compare_rest); rtx cr6 = gen_rtx_REG (CCmode, CR6_REGNO); - rtx dst_label; + rtx_code_label *dst_label; rtx cmp_rtx; if (branch_to_cleanup) { @@ -2029,7 +2031,7 @@ expand_block_compare (rtx operands[]) rtx s1addr = gen_reg_rtx (Pmode); rtx s2addr = gen_reg_rtx (Pmode); rtx off_reg = gen_reg_rtx (Pmode); - rtx cleanup_label = NULL; + rtx_code_label *cleanup_label = NULL; rtx vec_result = gen_reg_rtx (V16QImode); rtx s1data = gen_reg_rtx (V16QImode); rtx s2data = gen_reg_rtx (V16QImode); @@ -2127,8 +2129,9 @@ expand_strncmp_gpr_sequence (unsigned HOST_WIDE_INT bytes_to_compare, unsigned int base_align, rtx orig_src1, rtx orig_src2, rtx tmp_reg_src1, rtx tmp_reg_src2, rtx result_reg, - bool equality_compare_rest, rtx *p_cleanup_label, - rtx final_move_label) + bool equality_compare_rest, + rtx_code_label **p_cleanup_label, + rtx_code_label *final_move_label) { unsigned int word_mode_size = GET_MODE_SIZE (word_mode); machine_mode load_mode; @@ -2138,7 +2141,7 @@ expand_strncmp_gpr_sequence (unsigned HOST_WIDE_INT bytes_to_compare, rtx src1_addr = force_reg (Pmode, XEXP (orig_src1, 0)); rtx src2_addr = force_reg (Pmode, XEXP (orig_src2, 0)); gcc_assert (p_cleanup_label != NULL); - rtx cleanup_label = *p_cleanup_label; + rtx_code_label *cleanup_label = *p_cleanup_label; while (bytes_to_compare > 0) { @@ -2241,7 +2244,7 @@ expand_strncmp_gpr_sequence (unsigned HOST_WIDE_INT bytes_to_compare, A == B: branch to result 0. A != B: cleanup code to compute result. */ - rtx dst_label; + rtx_code_label *dst_label; if (remain > 0 || equality_compare_rest) { /* Branch to cleanup code, otherwise fall through to do @@ -2601,7 +2604,7 @@ expand_strn_compare (rtx operands[], int no_length) emit_label (begin_compare_label); } - rtx cleanup_label = NULL; + rtx_code_label *cleanup_label = NULL; rtx s1addr = NULL, s2addr = NULL, off_reg = NULL, vec_result = NULL; /* Generate a sequence of GPR or VEC/VSX instructions to compare out diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 77c032e6be19..0ae1af96f307 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -1130,8 +1130,8 @@ static int rs6000_debug_adjust_cost (rtx_insn *, int, rtx_insn *, int, static bool is_microcoded_insn (rtx_insn *); static bool is_nonpipeline_insn (rtx_insn *); static bool is_cracked_insn (rtx_insn *); -static bool is_load_insn (rtx, rtx *); -static bool is_store_insn (rtx, rtx *); +static bool is_load_insn (rtx_insn *, rtx *); +static bool is_store_insn (rtx_insn *, rtx *); static bool set_to_load_agen (rtx_insn *,rtx_insn *); static bool insn_terminates_group_p (rtx_insn *, enum group_termination); static bool insn_must_be_first_in_group (rtx_insn *); @@ -19143,7 +19143,7 @@ is_load_insn1 (rtx pat, rtx *load_mem) /* Determine if INSN loads from memory. */ static bool -is_load_insn (rtx insn, rtx *load_mem) +is_load_insn (rtx_insn *insn, rtx *load_mem) { if (!insn || !INSN_P (insn)) return false; @@ -19185,7 +19185,7 @@ is_store_insn1 (rtx pat, rtx *str_mem) /* Determine if INSN stores to memory. */ static bool -is_store_insn (rtx insn, rtx *str_mem) +is_store_insn (rtx_insn *insn, rtx *str_mem) { if (!insn || !INSN_P (insn)) return false; @@ -19221,8 +19221,6 @@ is_power9_pairable_vec_type (enum attr_type type) static bool rs6000_is_costly_dependence (dep_t dep, int cost, int distance) { - rtx insn; - rtx next; rtx load_mem, str_mem; /* If the flag is not enabled - no dependence is considered costly; @@ -19237,8 +19235,8 @@ rs6000_is_costly_dependence (dep_t dep, int cost, int distance) if (rs6000_sched_costly_dep == all_deps_costly) return true; - insn = DEP_PRO (dep); - next = DEP_CON (dep); + rtx_insn *insn = DEP_PRO (dep); + rtx_insn *next = DEP_CON (dep); if (rs6000_sched_costly_dep == store_to_load_dep_costly && is_load_insn (next, &load_mem) @@ -20124,7 +20122,7 @@ is_costly_group (rtx_insn **group_insns, rtx next_insn) FOR_EACH_DEP (insn, SD_LIST_RES_FORW, sd_it, dep) { - rtx next = DEP_CON (dep); + rtx_insn *next = DEP_CON (dep); if (next == next_insn && rs6000_is_costly_dependence (dep, dep_cost (dep), 0)) diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 5765a95a34f7..58eb4b18f083 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -11238,7 +11238,7 @@ as well do a reasonable job when we obviously can. */ if (rounded_size != const0_rtx) { - rtx loop_lab, end_loop; + rtx_code_label *loop_lab, *end_loop; bool rotated = CONST_INT_P (rounded_size); rtx update = GEN_INT (-probe_interval); if (probe_interval > 32768) diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc index cf174cf1b578..1c5ec4ff4d6f 100644 --- a/gcc/config/s390/s390.cc +++ b/gcc/config/s390/s390.cc @@ -5619,7 +5619,7 @@ static GTY(()) rtx s390_tls_symbol; static void s390_emit_tls_call_insn (rtx result_reg, rtx tls_call) { - rtx insn; + rtx_insn *insn; if (!flag_pic) emit_insn (s390_load_got ()); @@ -13973,7 +13973,7 @@ s390_expand_tbegin (rtx dest, rtx tdb, rtx retry, bool clobber_fprs_p) const int CC0 = 1 << 3; const int CC1 = 1 << 2; const int CC3 = 1 << 0; - rtx jump; + rtx_insn *jump; rtx count = gen_reg_rtx (SImode); rtx_code_label *leave_label = gen_label_rtx (); diff --git a/gcc/config/sh/sh.cc b/gcc/config/sh/sh.cc index bac22d0ff6dc..516a8da5dbef 100644 --- a/gcc/config/sh/sh.cc +++ b/gcc/config/sh/sh.cc @@ -6204,7 +6204,7 @@ sh_reorg (void) { rtx *patp = &PATTERN (scan), pat = *patp; rtx src, dst; - rtx lab; + rtx_code_label *lab; rtx newsrc; machine_mode mode; @@ -7173,14 +7173,14 @@ sh_expand_prologue (void) /* If we're supposed to switch stacks at function entry, do so now. */ if (sp_switch_attr) { - rtx lab, newsrc; + rtx newsrc; /* The argument specifies a variable holding the address of the stack the interrupt function should switch to/from at entry/exit. */ tree arg = TREE_VALUE ( TREE_VALUE (sp_switch_attr)); const char* s = ggc_strdup (TREE_STRING_POINTER (arg)); rtx sp_switch = gen_rtx_SYMBOL_REF (Pmode, s); - lab = add_constant (sp_switch, SImode, 0); + rtx_code_label *lab = add_constant (sp_switch, SImode, 0); newsrc = gen_rtx_LABEL_REF (VOIDmode, lab); emit_insn (gen_sp_switch_1 (newsrc)); diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 61db40f2a3a0..82304cb9dbb3 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -7332,8 +7332,9 @@ rtx lab = PATTERN (gen_call_site ()); sh_expand_sym_label2reg (operands[2], operands[0], lab, true); - rtx i = emit_call_insn (gen_sibcalli_pcrel_fdpic (operands[2], operands[1], - copy_rtx (lab))); + rtx_insn *i + = emit_call_insn (gen_sibcalli_pcrel_fdpic (operands[2], operands[1], + copy_rtx (lab))); SIBLING_CALL_P (i) = 1; DONE; } @@ -7472,10 +7473,11 @@ rtx tmp = gen_rtx_REG (SImode, R1_REG); sh_expand_sym_label2reg (tmp, operands[1], lab, true); - rtx call_insn = emit_call_insn (gen_sibcall_valuei_pcrel (operands[0], - tmp, - operands[2], - copy_rtx (lab))); + rtx_insn *call_insn + = emit_call_insn (gen_sibcall_valuei_pcrel (operands[0], + tmp, + operands[2], + copy_rtx (lab))); SIBLING_CALL_P (call_insn) = 1; DONE; } @@ -7504,10 +7506,11 @@ rtx tmp = gen_rtx_REG (SImode, R1_REG); sh_expand_sym_label2reg (tmp, operands[1], lab, true); - rtx i = emit_call_insn (gen_sibcall_valuei_pcrel_fdpic (operands[0], - tmp, - operands[2], - copy_rtx (lab))); + rtx_insn *i + = emit_call_insn (gen_sibcall_valuei_pcrel_fdpic (operands[0], + tmp, + operands[2], + copy_rtx (lab))); SIBLING_CALL_P (i) = 1; DONE; } @@ -7838,11 +7841,11 @@ [(match_operand 0 "" "") (match_operand 1 "" "")] "" { - rtx gotsym, insn; + rtx gotsym; gotsym = gen_sym2GOT (operands[1]); PUT_MODE (gotsym, Pmode); - insn = emit_insn (gen_symGOT_load (operands[0], gotsym)); + rtx_insn *insn = emit_insn (gen_symGOT_load (operands[0], gotsym)); MEM_READONLY_P (SET_SRC (PATTERN (insn))) = 1; @@ -7859,7 +7862,7 @@ { rtx gotsym = gen_sym2GOTFUNCDESC (operands[1]); PUT_MODE (gotsym, Pmode); - rtx insn = emit_insn (gen_symGOT_load (operands[0], gotsym)); + rtx_insn *insn = emit_insn (gen_symGOT_load (operands[0], gotsym)); MEM_READONLY_P (SET_SRC (PATTERN (insn))) = 1; diff --git a/gcc/config/sh/sh_treg_combine.cc b/gcc/config/sh/sh_treg_combine.cc index 13efadcc1bb3..8fa6843ef6ca 100644 --- a/gcc/config/sh/sh_treg_combine.cc +++ b/gcc/config/sh/sh_treg_combine.cc @@ -593,7 +593,7 @@ private: // Adds the specified insn to the set of modified or newly added insns that // might need splitting at the end of the pass. - rtx touched_insn (rtx i); + rtx_insn *touched_insn (rtx_insn *i); // Try to invert the branch condition of the specified trace. bool try_invert_branch_condition (cbranch_trace& trace); @@ -959,8 +959,8 @@ sh_treg_combine::make_inv_ccreg_insn (void) const return i; } -rtx -sh_treg_combine::touched_insn (rtx i) +rtx_insn * +sh_treg_combine::touched_insn (rtx_insn *i) { m_touched_insns.push_back (i); return i; @@ -1078,7 +1078,7 @@ sh_treg_combine::try_combine_comparisons (cbranch_trace& trace, // Check that all ccset insns are comparisons and all comparison types in // all BBs are the same and could be combined into one single comparison. rtx comp = NULL_RTX; - rtx comp_insn = NULL_RTX; + rtx_insn *comp_insn = nullptr; for (std::list<bb_entry>::const_iterator i = trace.bb_entries.begin (); i != trace.bb_entries.end (); ++i) diff --git a/gcc/explow.cc b/gcc/explow.cc index 134771446aa5..3469b733bc90 100644 --- a/gcc/explow.cc +++ b/gcc/explow.cc @@ -2020,8 +2020,8 @@ compute_stack_clash_protection_loop_data (rtx *rounded_size, rtx *last_addr, LAST addr is the value for SP which stops the loop. */ void -emit_stack_clash_protection_probe_loop_start (rtx *loop_lab, - rtx *end_lab, +emit_stack_clash_protection_probe_loop_start (rtx_code_label **loop_lab, + rtx_code_label **end_lab, rtx last_addr, bool rotated) { @@ -2122,7 +2122,7 @@ anti_adjust_stack_and_probe_stack_clash (rtx size) } else { - rtx loop_lab, end_loop; + rtx_code_label *loop_lab, *end_loop; bool rotate_loop = CONST_INT_P (rounded_size); emit_stack_clash_protection_probe_loop_start (&loop_lab, &end_loop, last_addr, rotate_loop); diff --git a/gcc/explow.h b/gcc/explow.h index 67b29a57c18f..7d3eb4f6951e 100644 --- a/gcc/explow.h +++ b/gcc/explow.h @@ -81,8 +81,10 @@ extern void anti_adjust_stack_and_probe_stack_clash (rtx); protection of dynamically allocated stack space. */ extern void compute_stack_clash_protection_loop_data (rtx *, rtx *, rtx *, HOST_WIDE_INT *, rtx); -extern void emit_stack_clash_protection_probe_loop_start (rtx *, rtx *, - rtx, bool); +extern void +emit_stack_clash_protection_probe_loop_start (rtx_code_label **, + rtx_code_label **, + rtx, bool); extern void emit_stack_clash_protection_probe_loop_end (rtx, rtx, rtx, bool); diff --git a/gcc/haifa-sched.cc b/gcc/haifa-sched.cc index e0505e9db64e..1382713121ae 100644 --- a/gcc/haifa-sched.cc +++ b/gcc/haifa-sched.cc @@ -5477,7 +5477,7 @@ reemit_notes (rtx_insn *insn) /* Move INSN. Reemit notes if needed. Update CFG, if needed. */ static void -move_insn (rtx_insn *insn, rtx_insn *last, rtx nt) +move_insn (rtx_insn *insn, rtx_insn *last, rtx_insn *nt) { if (PREV_INSN (insn) != last) { diff --git a/gcc/optabs.cc b/gcc/optabs.cc index 524a6836495b..513b19bf26ff 100644 --- a/gcc/optabs.cc +++ b/gcc/optabs.cc @@ -7226,7 +7226,7 @@ find_cc_set (rtx x, const_rtx pat, void *data) loop was generated successfully. */ static bool -expand_compare_and_swap_loop (rtx mem, rtx old_reg, rtx new_reg, rtx seq) +expand_compare_and_swap_loop (rtx mem, rtx old_reg, rtx new_reg, rtx_insn *seq) { machine_mode mode = GET_MODE (mem); rtx_code_label *label; @@ -7374,7 +7374,7 @@ maybe_emit_compare_and_swap_exchange_loop (rtx target, rtx mem, rtx val) val = force_reg (mode, val); if (!target || !register_operand (target, mode)) target = gen_reg_rtx (mode); - if (expand_compare_and_swap_loop (mem, target, val, NULL_RTX)) + if (expand_compare_and_swap_loop (mem, target, val, nullptr)) return target; else delete_insns_since (start);
