diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-25 21:19:23 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-25 21:19:23 +0000 |
commit | ce1ce33a037057b77a99ed0613f4369546dc82cd (patch) | |
tree | bf674dc0104d0e2f8915243f6f3e9e1b4acc1d1b /gcc/sched-deps.c | |
parent | f0cb8ae0d93a2a6d262414b8a662682db5c13368 (diff) | |
download | gcc-ce1ce33a037057b77a99ed0613f4369546dc82cd.zip gcc-ce1ce33a037057b77a99ed0613f4369546dc82cd.tar.gz gcc-ce1ce33a037057b77a99ed0613f4369546dc82cd.tar.bz2 |
Strengthen haifa_sched_info callbacks and 3 scheduler hooks
gcc/
* target.def (reorder): Strengthen param "ready" of this DEFHOOK
from rtx * to rtx_insn **.
(reorder2): Likewise.
(dependencies_evaluation_hook): Strengthen params "head", "tail"
from rtx to rtx_insn *.
* doc/tm.texi: Update mechanically for above change to target.def.
* sched-int.h (note_list): Strengthen this variable from rtx to
rtx_insn *.
(remove_notes): Likewise for both params.
(restore_other_notes): Likewise for return type and first param.
(struct ready_list): Strengthen field "vec" from rtx * to
rtx_insn **.
(struct dep_replacement): Strenghten field "insn" from rtx to
rtx_insn *.
(struct deps_desc): Likewise for fields "last_debug_insn",
"last_args_size".
(struct haifa_sched_info): Likewise for callback field
"can_schedule_ready_p"'s param, for first param of "new_ready"
callback field, for both params of "rank" callback field, for
first field of "print_insn" callback field (with a const), for
both params of "contributes_to_priority" callback, for param
of "insn_finishes_block_p" callback, for fields "prev_head",
"next_tail", "head", "tail", for first param of "add_remove_insn"
callback, for first param of "begin_schedule_ready" callback, for
both params of "begin_move_insn" callback, and for second param
of "advance_target_bb" callback.
(add_dependence): Likewise for params 1 and 2.
(sched_analyze): Likewise for params 2 and 3.
(deps_analyze_insn): Likewise for param 2.
(ready_element): Likewise for return type.
(ready_lastpos): Strengthen return type from rtx * to rtx_insn **.
(try_ready): Strenghten param from rtx to rtx_insn *.
(sched_emit_insn): Likewise for return type.
(record_delay_slot_pair): Likewise for params 1 and 2.
(add_delay_dependencies): Likewise for param.
(contributes_to_priority): Likewise for both params.
(find_modifiable_mems): Likewise.
* config/arm/arm.c (cortexa7_sched_reorder): Strengthen param
"ready" from rtx * to rtx_insn **. Strengthen locals "insn",
"first_older_only_insn" from rtx to rtx_insn *.
(arm_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **.
* config/c6x/c6x.c (struct c6x_sched_context): Strengthen field
"last_scheduled_iter0" from rtx to rtx_insn *.
(init_sched_state): Replace use of NULL_RTX with NULL for insn.
(c6x_sched_reorder_1): Strengthen param "ready" and locals
"e_ready", "insnp" from rtx * to rtx_insn **. Strengthen local
"insn" from rtx to rtx_insn *.
(c6x_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **.
(c6x_sched_reorder2): Strengthen param "ready" and locals
"e_ready", "insnp" from rtx * to rtx_insn **. Strengthen local
"insn" from rtx to rtx_insn *.
(c6x_variable_issue): Add a checked cast when assigning from insn
to ss.last_scheduled_iter0.
(split_delayed_branch): Strengthen param "insn" and local "i1"
from rtx to rtx_insn *.
(split_delayed_nonbranch): Likewise.
(undo_split_delayed_nonbranch): Likewise for local "insn".
(hwloop_optimize): Likewise for locals "seq", "insn", "prev",
"entry_after", "end_packet", "head_insn", "tail_insn",
"new_insns", "last_insn", "this_iter", "prev_stage_insn".
Strengthen locals "orig_vec", "copies", "insn_copies" from rtx *
to rtx_insn **. Remove now-redundant checked cast on last_insn,
but add a checked cast on loop->start_label. Consolidate calls to
avoid assigning result of gen_spkernel to "insn", now an
rtx_insn *.
* config/i386/i386.c (do_reorder_for_imul): Strengthen param
"ready" from rtx * to rtx_insn **. Strengthen local "insn" from
rtx to rtx_insn *.
(swap_top_of_ready_list): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen locals "top", "next" from rtx to
rtx_insn *.
(ix86_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen local "insn" from rtx to rtx_insn *.
(add_parameter_dependencies): Strengthen params "call", "head" and
locals "insn", "last", "first_arg" from rtx to rtx_insn *.
(avoid_func_arg_motion): Likewise for params "first_arg", "insn".
(add_dependee_for_func_arg): Likewise for param "arg" and local
"insn".
(ix86_dependencies_evaluation_hook): Likewise for params "head",
"tail" and locals "insn", "first_arg".
* config/ia64/ia64.c (ia64_dependencies_evaluation_hook): Likewise
for params "head", "tail" and locals "insn", "next", "next_tail".
(ia64_dfa_sched_reorder): Strengthen param "ready" and locals
"e_ready", "insnp" from rtx * to rtx_insn **. Strengthen locals
"insn", "lowest", "highest" from rtx to rtx_insn *.
(ia64_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **.
(ia64_sched_reorder2): Likewise.
* config/mep/mep.c (mep_find_ready_insn): Strengthen return type
and local "insn" from rtx to rtx_insn *. Strengthen param "ready"
from rtx * to rtx_insn **.
(mep_move_ready_insn): Strengthen param "ready" from rtx * to
rtx_insn **.
(mep_print_sched_insn): Strengthen param "insn" from rtx to
rtx_insn *.
(mep_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen locals "core_insn", "cop_insn" from rtx
to rtx_insn *.
* config/mips/mips.c (mips_promote_ready): Strengthen param "ready"
from rtx * to rtx_insn **. Strengthen local "new_head" from rtx
to rtx_insn *.
(mips_maybe_swap_ready): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen local "temp" from rtx to rtx_insn *.
(mips_macc_chains_reorder): Strengthen param "ready" from rtx * to
rtx_insn **.
(vr4130_reorder): Likewise.
(mips_74k_agen_reorder): Likewise. Strengthen local "insn" from
rtx to rtx_insn *.
(mips_sched_reorder_1): Strengthen param "ready" from rtx * to
rtx_insn **.
(mips_sched_reorder): Likewise.
(mips_sched_reorder2): Likewise.
* config/picochip/picochip.c (picochip_sched_reorder): Likewise.
* config/rs6000/rs6000.c (rs6000_sched_reorder): Likewise.
Strengthen local "tmp" from rtx to rtx_insn *.
(rs6000_sched_reorder2): Likewise.
* config/s390/s390.c (s390_z10_prevent_earlyload_conflicts):
Likewise. Update sizeof(rtx) to sizeof(rtx_insn *) in memmove.
(s390_sched_reorder): Strengthen param "ready" from rtx * to
rtx_insn **. Strengthen local "tmp" from rtx to rtx_insn *.
* config/sh/sh.c (rank_for_reorder): Strengthen locals "tmp",
"tmp2" from rtx to rtx_insn *.
(swap_reorder): Strengthen param "a" from rtx * to rtx_insn **.
Strengthen local "insn" from rtx to rtx_insn *.
(ready_reorder): Strengthen param "ready" from rtx * to
rtx_insn **. Update sizeof(rtx) to sizeof(rtx_insn *) in qsort.
(sh_reorder): Strengthen param "ready" from rtx * to rtx_insn **.
(sh_reorder2): Likewise.
* config/spu/spu.c (spu_sched_reorder): Likewise. Strengthen
local "insn" from rtx to rtx_insn *.
* haifa-sched.c (note_list): Strengthen this variable from rtx to
rtx_insn *.
(scheduled_insns): Strengthen this variable from vec<rtx> to
vec<rtx_insn *>.
(set_modulo_params): Likewise for locals "i1", "i2".
(record_delay_slot_pair): Likewise for params "i1", "i2".
(add_delay_dependencies): Likewise for param "insn".
(cond_clobbered_p): Likewise.
(recompute_todo_spec): Likewise for local "prev".
(last_scheduled_insn): Likewise for this variable.
(nonscheduled_insns_begin): Likewise.
(model_set_excess_costs): Strengthen param "insns" from rtx * to
rtx_insn **.
(rank_for_schedule): Strengthen locals "tmp", "tmp2" from rtx to
rtx_insn *.
(swap_sort): Strengthen param "a" from rtx * to rtx_insn **.
Strengthen local "insn" from rtx to rtx_insn *.
(queue_insn): Strengthen param "insn" from rtx to rtx_insn *.
(ready_lastpos): Strengthen return type from rtx * to rtx_insn **.
(ready_add): Strengthen param "insn" from rtx to rtx_insn *.
(ready_remove_first): Likewise for return type and local "t".
(ready_element): Likewise for return type.
(ready_remove): Likewise for return type and local "t".
(ready_sort): Strengthen local "first" from rtx * to rtx_insn **.
(check_clobbered_conditions): Strengthen local "x" from rtx to
rtx_insn *, adding a checked cast.
(schedule_insn): Likewise for param "insn".
(remove_notes): Likewise for params "head", "tail" and locals
"next_tail", "insn", "next".
(struct haifa_saved_data): Likewise for fields
"last_scheduled_insn", "nonscheduled_insns_begin".
(save_backtrack_point): Update for change to field "vec" of
struct ready_list.
(toggle_cancelled_flags): Strengthen local "first" from rtx * to
rtx_insn **.
(restore_last_backtrack_point): Likewise. Strengthen local "insn"
from rtx to rtx_insn *
(resolve_dependencies): Strengthen param "insn" from rtx to
rtx_insn *
(restore_other_notes): Likewise for return type, for param "head"
and local "note_head".
(undo_all_replacements): Likewise for local "insn".
(first_nonscheduled_insn): Likewise for return type and local "insn".
(queue_to_ready): Likewise for local "insn", adding checked casts.
(early_queue_to_ready): Likewise for local "insn".
(debug_ready_list_1): Strengthen local "p" from rtx * to
rtx_insn **.
(move_insn): Strengthen param "insn" and local "note" from rtx to
rtx_insn *
(insn_finishes_cycle_p): Likewise for param "insn".
(max_issue): Likewise for local "insn".
(choose_ready): Likewise. Strengthen param "insn_ptr" from rtx *
to rtx_insn **.
(commit_schedule): Strengthen param "prev_head" and local "insn"
from rtx to rtx_insn *
(prune_ready_list): Likewise for local "insn".
(schedule_block): Likewise for locals "prev_head", "head", "tail",
"skip_insn", "insn", "failed_insn", "x", adding a checked cast.
(set_priorities): Likewise for local "prev_head".
(try_ready): Likewise for param "next".
(fix_tick_ready): Likewise.
(change_queue_index): Likewise.
(sched_extend_ready_list): Update for change to field "vec" of
struct ready_list.
(generate_recovery_code): Strengthen param "insn" from rtx to
rtx_insn *.
(begin_speculative_block): Likewise.
(create_check_block_twin): Likewise for param "insn" and locals
"label", "check", "twin". Introduce local "check_pat" to avoid
"check" being used as a plain rtx before being used as an insn.
(fix_recovery_deps): Add a checked cast to rtx_insn * when
extracting elements from ready_list.
(sched_remove_insn): Strengthen param "insn" from rtx to
rtx_insn *.
(sched_emit_insn): Likewise for return type.
(ready_remove_first_dispatch): Likewise for return type and local
"insn".
* hw-doloop.c (discover_loop): Add a checked cast to rtx_insn *.
* modulo-sched.c (sms_print_insn): Strengthen from const_rtx to
const rtx_insn *.
* sched-deps.c (add_dependence): Strengthen params "con", "pro"
from rtx to rtx_insn *.
(add_dependence_list): Likewise for param "insn". Add a checked
cast.
(add_dependence_list_and_free): Strengthen param "insn" from rtx
to rtx_insn *. Strengthen param "list_p" from rtx * to
rtx_insn **.
(chain_to_prev_insn): Strengthen param "insn" and locals
"prec_nonnote", "i" from rtx to rtx_insn *.
(flush_pending_lists): Likewise for param "insn".
(cur_insn): Likewise for this variable.
(haifa_start_insn): Add a checked cast.
(note_dep): Strengthen param "e" from rtx to rtx_insn *.
(sched_analyze_reg): Likewise for param "insn".
(sched_analyze_1): Likewise.
(sched_analyze_2): Likewise. Add checked casts.
(sched_analyze_insn): Likewise. Also for local "prev".
(deps_analyze_insn): Likewise for param "insn".
(sched_analyze): Likewise for params "head", "tail" and local "insn".
(add_dependence_1): Likewise for params "insn", "elem".
(struct mem_inc_info): Likewise for fields "inc_insn", "mem_insn".
(parse_add_or_inc): Likewise for param "insn".
(find_inc): Likewise for local "inc_cand".
(find_modifiable_mems): Likewise for params "head", "tail" and
locals "insn", "next_tail".
* sched-ebb.c (init_ready_list): Likewise for local "insn".
(begin_schedule_ready): Likewise for param "insn".
(begin_move_insn): Likewise for params "insn" and "last".
(ebb_print_insn): Strengthen param "insn" from const_rtx to
const rtx_insn *.
(rank): Strengthen params "insn1", "insn2" from rtx to rtx_insn *.
(ebb_contributes_to_priority): Likewise for params "next", "insn".
(ebb_add_remove_insn): Likewise for param "insn".
(advance_target_bb): Likewise.
* sched-rgn.c (rgn_estimate_number_of_insns): Likewise for local
"insn".
(check_live): Likewise for param "insn".
(init_ready_list): Likewise for local "insn".
(can_schedule_ready_p): Likewise for param "insn".
(begin_schedule_ready): Likewise.
(new_ready): Likewise for param "next".
(rgn_print_insn): Likewise for param "insn".
(rgn_rank): Likewise for params "insn1", "insn2".
(contributes_to_priority): Likewise for params "next", "insn".
(rgn_insn_finishes_block_p): Likewise for param "insn".
(add_branch_dependences): Likewise for params "head", "tail" and
locals "insn", "last".
(rgn_add_remove_insn): Likewise for param "insn".
(advance_target_bb): Likewise.
* sel-sched-dump.c (sel_print_insn): Strengthen param "insn" from
const_rtx to const rtx_insn *.
* sel-sched-dump.h (sel_print_insn): Likewise.
* sel-sched-ir.c (advance_deps_context): Add a checked cast.
(deps_init_id): Likewise.
* sel-sched.c (convert_vec_av_set_to_ready): Likewise.
(invoke_reorder_hooks): Strengthen local "arr" from rtx * to
rtx_insn **.
From-SVN: r214481
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r-- | gcc/sched-deps.c | 84 |
1 files changed, 44 insertions, 40 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index f2ebff7..e86fa40 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -482,17 +482,17 @@ static int cache_size; static bool mark_as_hard; static int deps_may_trap_p (const_rtx); -static void add_dependence_1 (rtx, rtx, enum reg_note); -static void add_dependence_list (rtx, rtx, int, enum reg_note, bool); -static void add_dependence_list_and_free (struct deps_desc *, rtx, +static void add_dependence_1 (rtx_insn *, rtx_insn *, enum reg_note); +static void add_dependence_list (rtx_insn *, rtx, int, enum reg_note, bool); +static void add_dependence_list_and_free (struct deps_desc *, rtx_insn *, rtx *, int, enum reg_note, bool); static void delete_all_dependences (rtx); -static void chain_to_prev_insn (rtx); +static void chain_to_prev_insn (rtx_insn *); -static void flush_pending_lists (struct deps_desc *, rtx, int, int); -static void sched_analyze_1 (struct deps_desc *, rtx, rtx); -static void sched_analyze_2 (struct deps_desc *, rtx, rtx); -static void sched_analyze_insn (struct deps_desc *, rtx, rtx); +static void flush_pending_lists (struct deps_desc *, rtx_insn *, int, int); +static void sched_analyze_1 (struct deps_desc *, rtx, rtx_insn *); +static void sched_analyze_2 (struct deps_desc *, rtx, rtx_insn *); +static void sched_analyze_insn (struct deps_desc *, rtx, rtx_insn *); static bool sched_has_condition_p (const_rtx); static int conditions_mutex_p (const_rtx, const_rtx, bool, bool); @@ -1513,7 +1513,7 @@ sd_debug_lists (rtx insn, sd_list_types_def types) impossible; otherwise we add additional true dependencies on the INSN_COND_DEPS list of the jump (which PRO must be). */ void -add_dependence (rtx con, rtx pro, enum reg_note dep_type) +add_dependence (rtx_insn *con, rtx_insn *pro, enum reg_note dep_type) { if (dep_type == REG_DEP_CONTROL && !(current_sched_info->flags & DO_PREDICATION)) @@ -1561,14 +1561,14 @@ add_dependence (rtx con, rtx pro, enum reg_note dep_type) true if DEP_NONREG should be set on newly created dependencies. */ static void -add_dependence_list (rtx insn, rtx list, int uncond, enum reg_note dep_type, +add_dependence_list (rtx_insn *insn, rtx list, int uncond, enum reg_note dep_type, bool hard) { mark_as_hard = hard; for (; list; list = XEXP (list, 1)) { if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0))) - add_dependence (insn, XEXP (list, 0), dep_type); + add_dependence (insn, as_a <rtx_insn *> (XEXP (list, 0)), dep_type); } mark_as_hard = false; } @@ -1578,7 +1578,7 @@ add_dependence_list (rtx insn, rtx list, int uncond, enum reg_note dep_type, newly created dependencies. */ static void -add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp, +add_dependence_list_and_free (struct deps_desc *deps, rtx_insn *insn, rtx *listp, int uncond, enum reg_note dep_type, bool hard) { add_dependence_list (insn, *listp, uncond, dep_type, hard); @@ -1661,15 +1661,15 @@ delete_all_dependences (rtx insn) the previous nonnote insn. */ static void -chain_to_prev_insn (rtx insn) +chain_to_prev_insn (rtx_insn *insn) { sd_iterator_def sd_it; dep_t dep; - rtx prev_nonnote; + rtx_insn *prev_nonnote; FOR_EACH_DEP (insn, SD_LIST_BACK, sd_it, dep) { - rtx i = insn; + rtx_insn *i = insn; rtx_insn *pro = DEP_PRO (dep); do @@ -1749,7 +1749,7 @@ add_insn_mem_dependence (struct deps_desc *deps, bool read_p, dependencies for a read operation, similarly with FOR_WRITE. */ static void -flush_pending_lists (struct deps_desc *deps, rtx insn, int for_read, +flush_pending_lists (struct deps_desc *deps, rtx_insn *insn, int for_read, int for_write) { if (for_write) @@ -1796,7 +1796,7 @@ flush_pending_lists (struct deps_desc *deps, rtx insn, int for_read, } /* Instruction which dependencies we are analyzing. */ -static rtx cur_insn = NULL_RTX; +static rtx_insn *cur_insn = NULL; /* Implement hooks for haifa scheduler. */ @@ -1805,7 +1805,7 @@ haifa_start_insn (rtx insn) { gcc_assert (insn && !cur_insn); - cur_insn = insn; + cur_insn = as_a <rtx_insn *> (insn); } static void @@ -1895,7 +1895,7 @@ note_mem_dep (rtx m1, rtx m2, rtx e, ds_t ds) } static void -note_dep (rtx e, ds_t ds) +note_dep (rtx_insn *e, ds_t ds) { if (sched_deps_info->note_dep) sched_deps_info->note_dep (e, ds); @@ -2298,7 +2298,7 @@ maybe_extend_reg_info_p (void) static void sched_analyze_reg (struct deps_desc *deps, int regno, enum machine_mode mode, - enum rtx_code ref, rtx insn) + enum rtx_code ref, rtx_insn *insn) { /* We could emit new pseudos in renaming. Extend the reg structures. */ if (!reload_completed && sel_sched_p () @@ -2376,7 +2376,7 @@ sched_analyze_reg (struct deps_desc *deps, int regno, enum machine_mode mode, destination of X, and reads of everything mentioned. */ static void -sched_analyze_1 (struct deps_desc *deps, rtx x, rtx insn) +sched_analyze_1 (struct deps_desc *deps, rtx x, rtx_insn *insn) { rtx dest = XEXP (x, 0); enum rtx_code code = GET_CODE (x); @@ -2548,7 +2548,7 @@ sched_analyze_1 (struct deps_desc *deps, rtx x, rtx insn) /* Analyze the uses of memory and registers in rtx X in INSN. */ static void -sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn) +sched_analyze_2 (struct deps_desc *deps, rtx x, rtx_insn *insn) { int i; int j; @@ -2669,7 +2669,8 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn) } for (u = deps->last_pending_memory_flush; u; u = XEXP (u, 1)) - add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI); + add_dependence (insn, as_a <rtx_insn *> (XEXP (u, 0)), + REG_DEP_ANTI); for (u = deps->pending_jump_insns; u; u = XEXP (u, 1)) if (deps_may_trap_p (x)) @@ -2680,10 +2681,11 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn) ds_t ds = set_dep_weak (DEP_ANTI, BEGIN_CONTROL, MAX_DEP_WEAK); - note_dep (XEXP (u, 0), ds); + note_dep (as_a <rtx_insn *> (XEXP (u, 0)), ds); } else - add_dependence (insn, XEXP (u, 0), REG_DEP_CONTROL); + add_dependence (insn, as_a <rtx_insn *> (XEXP (u, 0)), + REG_DEP_CONTROL); } } @@ -2861,7 +2863,7 @@ sched_macro_fuse_insns (rtx insn) /* Analyze an INSN with pattern X to find all dependencies. */ static void -sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn) +sched_analyze_insn (struct deps_desc *deps, rtx x, rtx_insn *insn) { RTX_CODE code = GET_CODE (x); rtx link; @@ -3009,7 +3011,8 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn) while (pending) { if (! sched_insns_conditions_mutex_p (insn, XEXP (pending, 0))) - add_dependence (insn, XEXP (pending, 0), REG_DEP_OUTPUT); + add_dependence (insn, as_a <rtx_insn *> (XEXP (pending, 0)), + REG_DEP_OUTPUT); pending = XEXP (pending, 1); pending_mem = XEXP (pending_mem, 1); } @@ -3020,7 +3023,8 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn) { if (MEM_VOLATILE_P (XEXP (pending_mem, 0)) && ! sched_insns_conditions_mutex_p (insn, XEXP (pending, 0))) - add_dependence (insn, XEXP (pending, 0), REG_DEP_OUTPUT); + add_dependence (insn, as_a <rtx_insn *> (XEXP (pending, 0)), + REG_DEP_OUTPUT); pending = XEXP (pending, 1); pending_mem = XEXP (pending_mem, 1); } @@ -3051,7 +3055,7 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn) /* Add register dependencies for insn. */ if (DEBUG_INSN_P (insn)) { - rtx prev = deps->last_debug_insn; + rtx_insn *prev = deps->last_debug_insn; rtx u; if (!deps->readonly) @@ -3065,7 +3069,7 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn) if (!sel_sched_p ()) for (u = deps->last_pending_memory_flush; u; u = XEXP (u, 1)) - add_dependence (insn, XEXP (u, 0), REG_DEP_ANTI); + add_dependence (insn, as_a <rtx_insn *> (XEXP (u, 0)), REG_DEP_ANTI); EXECUTE_IF_SET_IN_REG_SET (reg_pending_uses, 0, i, rsi) { @@ -3585,7 +3589,7 @@ chain_to_prev_insn_p (rtx insn) /* Analyze INSN with DEPS as a context. */ void -deps_analyze_insn (struct deps_desc *deps, rtx insn) +deps_analyze_insn (struct deps_desc *deps, rtx_insn *insn) { if (sched_deps_info->start_insn) sched_deps_info->start_insn (insn); @@ -3770,9 +3774,9 @@ deps_start_bb (struct deps_desc *deps, rtx head) /* Analyze every insn between HEAD and TAIL inclusive, creating backward dependencies for each insn. */ void -sched_analyze (struct deps_desc *deps, rtx head, rtx tail) +sched_analyze (struct deps_desc *deps, rtx_insn *head, rtx_insn *tail) { - rtx insn; + rtx_insn *insn; if (sched_deps_info->use_cselib) cselib_init (CSELIB_RECORD_MEMORY); @@ -4204,7 +4208,7 @@ estimate_dep_weak (rtx mem1, rtx mem2) This function can handle same INSN and ELEM (INSN == ELEM). It is a convenience wrapper. */ static void -add_dependence_1 (rtx insn, rtx elem, enum reg_note dep_type) +add_dependence_1 (rtx_insn *insn, rtx_insn *elem, enum reg_note dep_type) { ds_t ds; bool internal; @@ -4601,8 +4605,8 @@ check_dep (dep_t dep, bool relaxed_p) insns which depend on each other, but could possibly be interchanged. */ struct mem_inc_info { - rtx inc_insn; - rtx mem_insn; + rtx_insn *inc_insn; + rtx_insn *mem_insn; rtx *mem_loc; /* A register occurring in the memory address for which we wish to break @@ -4657,7 +4661,7 @@ attempt_change (struct mem_inc_info *mii, rtx new_addr) a corresponding memory reference. */ static bool -parse_add_or_inc (struct mem_inc_info *mii, rtx insn, bool before_mem) +parse_add_or_inc (struct mem_inc_info *mii, rtx_insn *insn, bool before_mem) { rtx pat = single_set (insn); rtx src, cst; @@ -4727,7 +4731,7 @@ find_inc (struct mem_inc_info *mii, bool backwards) dep_node_t node = DEP_LINK_NODE (*sd_it.linkp); rtx_insn *pro = DEP_PRO (dep); rtx_insn *con = DEP_CON (dep); - rtx inc_cand = backwards ? pro : con; + rtx_insn *inc_cand = backwards ? pro : con; if (DEP_NONREG (dep) || DEP_MULTIPLE (dep)) goto next; if (parse_add_or_inc (mii, inc_cand, backwards)) @@ -4894,9 +4898,9 @@ find_mem (struct mem_inc_info *mii, rtx *address_of_x) dependencies that can be broken by modifying one of the patterns. */ void -find_modifiable_mems (rtx head, rtx tail) +find_modifiable_mems (rtx_insn *head, rtx_insn *tail) { - rtx insn, next_tail = NEXT_INSN (tail); + rtx_insn *insn, *next_tail = NEXT_INSN (tail); int success_in_block = 0; for (insn = head; insn != next_tail; insn = NEXT_INSN (insn)) |