https://gcc.gnu.org/g:a980e017c07f08090ade2345c03653fe8450ff61
commit r17-5232-ga980e017c07f08090ade2345c03653fe8450ff61 Author: Trevor Saunders <[email protected]> Date: Wed Oct 14 14:25:52 2026 +0200 pass rtx_insn * around in the scheduler more gcc/ChangeLog: * config/i386/x86-tune-sched-atom.cc (do_reorder_for_imul): Take an rtx_insn *. * config/rs6000/rs6000.cc (is_costly_group): Likewise. (force_new_group): Likewise. (redefine_groups): Likewise. * haifa-sched.cc (haifa_classify_insn): Likewise. (rfs_result): Likewise. * modulo-sched.cc (compute_jump_reg_dependencies): Likewise. * sched-deps.cc (sd_next_list): Likewise. (sd_lists_size): Likewise. (sd_lists_empty_p): Likewise. (sd_find_dep_between_no_cache): Likewise. (sd_find_dep_between): Likewise. (dump_lists): Likewise. (sd_debug_lists): Likewise. (create_insn_reg_set): Likewise. (insn_use_p): Likewise. (mark_insn_pseudo_birth): Likewise. (mark_insn_hard_regno_birth): Likewise. (mark_insn_reg_birth): Likewise. (mark_insn_reg_store): Likewise. (mark_insn_reg_clobber): Likewise. * sched-ebb.cc (earliest_block_with_similiar_load): Likewise. (ebb_compute_jump_reg_dependencies): Likewise. * sched-int.h (sel_add_to_insn_priority): Likewise. (haifa_classify_insn): Likewise. Remove the duplicate prototype. (sel_insn_is_speculation_check): Likewise. (ebb_compute_jump_reg_dependencies): Likewise. (struct sched_deps_info_def): Use rtx_insn * in the jump callback. (sd_next_list): Take an rtx_insn *. (struct _sd_iterator): Store the insn as an rtx_insn *. (sd_iterator_start): Take an rtx_insn *. (sd_lists_size): Likewise. (sd_lists_empty_p): Likewise. (sd_find_dep_between): Likewise. (sd_debug_lists): Likewise. * sched-rgn.cc (is_pfree): Likewise. (is_conditionally_protected): Likewise. (is_prisky): Likewise. (set_spec_fed): Likewise. (compute_jump_reg_dependencies): Likewise. * sel-sched-dump.cc (dump_insn_rtx_1): Likewise. (dump_insn_rtx): Likewise. (debug_insn_rtx): Likewise. * sel-sched-dump.h (dump_insn_rtx_1): Likewise. (dump_insn_rtx): Likewise. (debug_insn_rtx): Likewise. * sel-sched-ir.cc (find_in_history_vect): Likewise. (sel_insn_is_speculation_check): Likewise. (get_dest_and_mode): Likewise. (create_copy_of_insn_rtx): Likewise. * sel-sched-ir.h (find_in_history_vect): Likewise. (get_dest_and_mode): Likewise. (create_copy_of_insn_rtx): Likewise. * sel-sched.cc (in_fallthru_bb_p): Likewise. (sel_add_to_insn_priority): Likewise. Diff: --- gcc/config/i386/x86-tune-sched-atom.cc | 3 +-- gcc/config/rs6000/rs6000.cc | 10 +++++----- gcc/haifa-sched.cc | 5 +++-- gcc/modulo-sched.cc | 2 +- gcc/sched-deps.cc | 29 +++++++++++++++-------------- gcc/sched-ebb.cc | 6 +++--- gcc/sched-int.h | 28 +++++++++++++--------------- gcc/sched-rgn.cc | 18 +++++++++--------- gcc/sel-sched-dump.cc | 6 +++--- gcc/sel-sched-dump.h | 6 +++--- gcc/sel-sched-ir.cc | 8 ++++---- gcc/sel-sched-ir.h | 6 +++--- gcc/sel-sched.cc | 4 ++-- 13 files changed, 65 insertions(+), 66 deletions(-) diff --git a/gcc/config/i386/x86-tune-sched-atom.cc b/gcc/config/i386/x86-tune-sched-atom.cc index da2ac1b4cb1d..4e433b0fa652 100644 --- a/gcc/config/i386/x86-tune-sched-atom.cc +++ b/gcc/config/i386/x86-tune-sched-atom.cc @@ -80,8 +80,7 @@ do_reorder_for_imul (rtx_insn **ready, int n_ready) FOR_EACH_DEP (insn, SD_LIST_FORW, sd_it, dep) { - rtx con; - con = DEP_CON (dep); + rtx_insn *con = DEP_CON (dep); if (!NONDEBUG_INSN_P (con)) continue; insn1 = PATTERN (con); diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 8cfc8183b839..a819b2ece9e5 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -20089,7 +20089,7 @@ insn_must_be_last_in_group (rtx_insn *insn) dispatch group) from the insns in GROUP_INSNS. Return false otherwise. */ static bool -is_costly_group (rtx *group_insns, rtx next_insn) +is_costly_group (rtx_insn **group_insns, rtx next_insn) { int i; int issue_rate = rs6000_issue_rate (); @@ -20098,7 +20098,7 @@ is_costly_group (rtx *group_insns, rtx next_insn) { sd_iterator_def sd_it; dep_t dep; - rtx insn = group_insns[i]; + rtx_insn *insn = group_insns[i]; if (!insn) continue; @@ -20130,7 +20130,7 @@ is_costly_group (rtx *group_insns, rtx next_insn) last group, and how many dispatch groups were encountered so far). */ static int -force_new_group (int sched_verbose, FILE *dump, rtx *group_insns, +force_new_group (int sched_verbose, FILE *dump, rtx_insn **group_insns, rtx_insn *next_insn, bool *group_end, int can_issue_more, int *group_count) { @@ -20287,11 +20287,11 @@ redefine_groups (FILE *dump, int sched_verbose, rtx_insn *prev_head_insn, int slot, i; bool group_end; int group_count = 0; - rtx *group_insns; + rtx_insn **group_insns; /* Initialize. */ issue_rate = rs6000_issue_rate (); - group_insns = XALLOCAVEC (rtx, issue_rate); + group_insns = XALLOCAVEC (rtx_insn *, issue_rate); for (i = 0; i < issue_rate; i++) { group_insns[i] = 0; diff --git a/gcc/haifa-sched.cc b/gcc/haifa-sched.cc index 17457dd0ac48..e0505e9db64e 100644 --- a/gcc/haifa-sched.cc +++ b/gcc/haifa-sched.cc @@ -558,7 +558,7 @@ haifa_classify_rtx (const_rtx x) } int -haifa_classify_insn (const_rtx insn) +haifa_classify_insn (const rtx_insn *insn) { return haifa_classify_rtx (PATTERN (insn)); } @@ -2583,7 +2583,8 @@ static rank_for_schedule_stats_t rank_for_schedule_stats; /* Return the result of comparing insns TMP and TMP2 and update Rank_For_Schedule statistics. */ static int -rfs_result (enum rfs_decision decision, int result, rtx tmp, rtx tmp2) +rfs_result (enum rfs_decision decision, int result, rtx_insn *tmp, + rtx_insn *tmp2) { ++rank_for_schedule_stats.stats[decision]; if (result < 0) diff --git a/gcc/modulo-sched.cc b/gcc/modulo-sched.cc index 3845233107b1..f2f41bd54079 100644 --- a/gcc/modulo-sched.cc +++ b/gcc/modulo-sched.cc @@ -254,7 +254,7 @@ sms_print_insn (const rtx_insn *insn, int aligned ATTRIBUTE_UNUSED) } static void -compute_jump_reg_dependencies (rtx insn ATTRIBUTE_UNUSED, +compute_jump_reg_dependencies (rtx_insn *insn ATTRIBUTE_UNUSED, regset used ATTRIBUTE_UNUSED) { } diff --git a/gcc/sched-deps.cc b/gcc/sched-deps.cc index d1e69af1e816..811e8b599192 100644 --- a/gcc/sched-deps.cc +++ b/gcc/sched-deps.cc @@ -709,7 +709,7 @@ sched_insn_is_legitimate_for_speculation_p (const rtx_insn *insn, ds_t ds) This function is used to switch sd_iterator to the next list. !!! For internal use only. Might consider moving it to sched-int.h. */ void -sd_next_list (const_rtx insn, sd_list_types_def *types_ptr, +sd_next_list (const rtx_insn *insn, sd_list_types_def *types_ptr, deps_list_t *list_ptr, bool *resolved_p_ptr) { sd_list_types_def types = *types_ptr; @@ -754,7 +754,7 @@ sd_next_list (const_rtx insn, sd_list_types_def *types_ptr, /* Return the summary size of INSN's lists defined by LIST_TYPES. */ int -sd_lists_size (const_rtx insn, sd_list_types_def list_types) +sd_lists_size (const rtx_insn *insn, sd_list_types_def list_types) { int size = 0; @@ -774,7 +774,7 @@ sd_lists_size (const_rtx insn, sd_list_types_def list_types) /* Return true if INSN's lists defined by LIST_TYPES are all empty. */ bool -sd_lists_empty_p (const_rtx insn, sd_list_types_def list_types) +sd_lists_empty_p (const rtx_insn *insn, sd_list_types_def list_types) { while (list_types != SD_LIST_NONE) { @@ -830,7 +830,7 @@ sd_finish_insn (rtx_insn *insn) otherwise return the dependency and initialize SD_IT_PTR [if it is nonnull] with an iterator pointing to it. */ static dep_t -sd_find_dep_between_no_cache (rtx pro, rtx con, bool resolved_p, +sd_find_dep_between_no_cache (rtx_insn *pro, rtx_insn *con, bool resolved_p, sd_iterator_def *sd_it_ptr) { sd_list_types_def pro_list_type; @@ -889,7 +889,7 @@ sd_find_dep_between_no_cache (rtx pro, rtx con, bool resolved_p, Search through resolved dependency lists if RESOLVED_P is true. If the dependency or NULL if none found. */ dep_t -sd_find_dep_between (rtx pro, rtx con, bool resolved_p) +sd_find_dep_between (rtx_insn *pro, rtx_insn *con, bool resolved_p) { if (true_dependency_cache != NULL) /* Avoiding the list walk below can cut compile times dramatically @@ -1470,7 +1470,7 @@ sd_delete_dep (sd_iterator_def sd_it) If FLAGS has the very first bit set, then dump all information about the lists and propagate this bit into the callee dump functions. */ static void -dump_lists (FILE *dump, rtx insn, sd_list_types_def types, int flags) +dump_lists (FILE *dump, rtx_insn *insn, sd_list_types_def types, int flags) { sd_iterator_def sd_it; dep_t dep; @@ -1499,7 +1499,7 @@ dump_lists (FILE *dump, rtx insn, sd_list_types_def types, int flags) /* Dump all information about deps_lists of INSN specified by TYPES to STDERR. */ void -sd_debug_lists (rtx insn, sd_list_types_def types) +sd_debug_lists (rtx_insn *insn, sd_list_types_def types) { dump_lists (stderr, insn, types, 1); fprintf (stderr, "\n"); @@ -1943,7 +1943,7 @@ create_insn_reg_use (int regno, rtx_insn *insn) /* Allocate reg_set_data structure for REGNO and INSN. */ static void -create_insn_reg_set (int regno, rtx insn) +create_insn_reg_set (int regno, rtx_insn *insn) { struct reg_set_data *set; @@ -1995,7 +1995,7 @@ static struct reg_pressure_data reg_pressure_info[N_REG_CLASSES]; /* Return TRUE if INSN has the use structure for REGNO. */ static bool -insn_use_p (rtx insn, int regno) +insn_use_p (rtx_insn *insn, int regno) { struct reg_use_data *use; @@ -2009,7 +2009,8 @@ insn_use_p (rtx insn, int regno) in INSN. Arguments CLOBBER_P and UNUSED_P say correspondingly that the register is in clobber or unused after the insn. */ static void -mark_insn_pseudo_birth (rtx insn, int regno, bool clobber_p, bool unused_p) +mark_insn_pseudo_birth (rtx_insn *insn, int regno, bool clobber_p, + bool unused_p) { int incr, new_incr; enum reg_class cl; @@ -2044,7 +2045,7 @@ mark_insn_pseudo_birth (rtx insn, int regno, bool clobber_p, bool unused_p) /* Like mark_insn_pseudo_regno_birth except that NREGS saying how many hard registers involved in the birth. */ static void -mark_insn_hard_regno_birth (rtx insn, int regno, int nregs, +mark_insn_hard_regno_birth (rtx_insn *insn, int regno, int nregs, bool clobber_p, bool unused_p) { enum reg_class cl; @@ -2088,7 +2089,7 @@ mark_insn_hard_regno_birth (rtx insn, int regno, int nregs, correspondingly that the register is in clobber or unused after the insn. */ static void -mark_insn_reg_birth (rtx insn, rtx reg, bool clobber_p, bool unused_p) +mark_insn_reg_birth (rtx_insn *insn, rtx reg, bool clobber_p, bool unused_p) { int regno; @@ -2171,7 +2172,7 @@ mark_insn_reg_store (rtx reg, const_rtx setter, void *data) if (setter != NULL_RTX && GET_CODE (setter) != SET) return; mark_insn_reg_birth - ((rtx) data, reg, false, + ((rtx_insn *) data, reg, false, find_reg_note ((const_rtx) data, REG_UNUSED, reg) != NULL_RTX); } @@ -2180,7 +2181,7 @@ static void mark_insn_reg_clobber (rtx reg, const_rtx setter, void *data) { if (GET_CODE (setter) == CLOBBER) - mark_insn_reg_birth ((rtx) data, reg, true, false); + mark_insn_reg_birth ((rtx_insn *) data, reg, true, false); } /* Set up reg pressure info related to INSN. */ diff --git a/gcc/sched-ebb.cc b/gcc/sched-ebb.cc index 7135f286bd0f..754dd4355f51 100644 --- a/gcc/sched-ebb.cc +++ b/gcc/sched-ebb.cc @@ -55,7 +55,7 @@ static bool schedule_more_p (void); static const char *ebb_print_insn (const rtx_insn *, int); static int rank (rtx_insn *, rtx_insn *); static bool ebb_contributes_to_priority (rtx_insn *, rtx_insn *); -static basic_block earliest_block_with_similiar_load (basic_block, rtx); +static basic_block earliest_block_with_similiar_load (basic_block, rtx_insn *); static void add_deps_for_risky_insns (rtx_insn *, rtx_insn *); static void debug_ebb_dependencies (rtx_insn *, rtx_insn *); @@ -252,7 +252,7 @@ ebb_contributes_to_priority (rtx_insn *next ATTRIBUTE_UNUSED, must be considered as used by this jump in USED. */ void -ebb_compute_jump_reg_dependencies (rtx insn, regset used) +ebb_compute_jump_reg_dependencies (rtx_insn *insn, regset used) { basic_block b = BLOCK_FOR_INSN (insn); edge e; @@ -321,7 +321,7 @@ static struct haifa_sched_info ebb_sched_info = blocks in EBB. The list is formed in `add_deps_for_risky_insns'. */ static basic_block -earliest_block_with_similiar_load (basic_block last_block, rtx load_insn) +earliest_block_with_similiar_load (basic_block last_block, rtx_insn *load_insn) { sd_iterator_def back_sd_it; dep_t back_dep; diff --git a/gcc/sched-int.h b/gcc/sched-int.h index 22f5810793fb..9ef1b20d3679 100644 --- a/gcc/sched-int.h +++ b/gcc/sched-int.h @@ -97,7 +97,7 @@ sel_sched_p (void) extern int get_rgn_sched_max_insns_priority (void); /* Increases effective priority for INSN by AMOUNT. */ -extern void sel_add_to_insn_priority (rtx, int); +extern void sel_add_to_insn_priority (rtx_insn *, int); /* True if during selective scheduling we need to emulate some of haifa scheduler behavior. */ @@ -131,9 +131,6 @@ extern void *xrecalloc (void *, size_t, size_t, size_t); extern void reemit_notes (rtx_insn *); -/* Functions in haifa-sched.cc. */ -extern int haifa_classify_insn (const_rtx); - /* Functions in sel-sched-ir.cc. */ extern void sel_find_rgns (void); extern void sel_mark_hard_insn (rtx); @@ -146,7 +143,7 @@ extern void setup_sched_dump (void); extern void sched_init (void); extern void sched_finish (void); -extern bool sel_insn_is_speculation_check (rtx); +extern bool sel_insn_is_speculation_check (rtx_insn *); /* Describe the ready list of the scheduler. VEC holds space enough for all insns in the current region. VECLEN @@ -170,7 +167,7 @@ extern struct ready_list ready; extern int max_issue (struct ready_list *, int, state_t, bool, int *); -extern void ebb_compute_jump_reg_dependencies (rtx, regset); +extern void ebb_compute_jump_reg_dependencies (rtx_insn *, regset); extern edge find_fallthru_edge_from (basic_block); @@ -1310,7 +1307,7 @@ struct sched_deps_info_def /* Called when computing dependencies for a JUMP_INSN. This function should store the set of registers that must be considered as set by the jump in the regset. */ - void (*compute_jump_reg_dependencies) (rtx, regset); + void (*compute_jump_reg_dependencies) (rtx_insn *, regset); /* Start analyzing insn. */ void (*start_insn) (rtx_insn *); @@ -1416,7 +1413,7 @@ extern void initialize_live_range_shrinkage (void); extern void finish_live_range_shrinkage (void); extern void sched_init_region_reg_pressure_info (void); extern void free_global_sched_pressure_data (void); -extern int haifa_classify_insn (const_rtx); +extern int haifa_classify_insn (const rtx_insn *); extern void get_ebb_head_tail (basic_block, basic_block, rtx_insn **, rtx_insn **); extern bool no_real_insns_p (const rtx_insn *, const rtx_insn *); @@ -1576,7 +1573,8 @@ extern void find_modifiable_mems (rtx_insn *, rtx_insn *); /* A type to hold above flags. */ typedef int sd_list_types_def; -extern void sd_next_list (const_rtx, sd_list_types_def *, deps_list_t *, bool *); +extern void sd_next_list (const rtx_insn *, sd_list_types_def *, + deps_list_t *, bool *); /* Iterator to walk through, resolve and delete dependencies. */ struct _sd_iterator @@ -1585,7 +1583,7 @@ struct _sd_iterator sd_list_types_def types; /* Instruction dependencies lists of which will be walked. */ - rtx insn; + rtx_insn *insn; /* Pointer to the next field of the previous element. This is not simply a pointer to the next element to allow easy deletion from the @@ -1611,7 +1609,7 @@ typedef struct _sd_iterator sd_iterator_def; /* Return initialized iterator. */ inline sd_iterator_def -sd_iterator_start (rtx insn, sd_list_types_def types) +sd_iterator_start (rtx_insn *insn, sd_list_types_def types) { /* Some dep_link a pointer to which will return NULL. */ static dep_link_t null_link = NULL; @@ -1686,18 +1684,18 @@ sd_iterator_next (sd_iterator_def *it_ptr) #define DISPATCH_INIT 5 #define ADD_TO_DISPATCH_WINDOW 6 -extern int sd_lists_size (const_rtx, sd_list_types_def); -extern bool sd_lists_empty_p (const_rtx, sd_list_types_def); +extern int sd_lists_size (const rtx_insn *, sd_list_types_def); +extern bool sd_lists_empty_p (const rtx_insn *, sd_list_types_def); extern void sd_init_insn (rtx_insn *); extern void sd_finish_insn (rtx_insn *); -extern dep_t sd_find_dep_between (rtx, rtx, bool); +extern dep_t sd_find_dep_between (rtx_insn *, rtx_insn *, bool); extern void sd_add_dep (dep_t, bool); extern enum DEPS_ADJUST_RESULT sd_add_or_update_dep (dep_t, bool); extern void sd_resolve_dep (sd_iterator_def); extern void sd_unresolve_dep (sd_iterator_def); extern void sd_copy_back_deps (rtx_insn *, rtx_insn *, bool); extern void sd_delete_dep (sd_iterator_def); -extern void sd_debug_lists (rtx, sd_list_types_def); +extern void sd_debug_lists (rtx_insn *, sd_list_types_def); extern int dep_list_size (rtx_insn *, sd_list_types_def); diff --git a/gcc/sched-rgn.cc b/gcc/sched-rgn.cc index a3df373a64fd..8334e90b3024 100644 --- a/gcc/sched-rgn.cc +++ b/gcc/sched-rgn.cc @@ -233,10 +233,10 @@ static edgeset *ancestor_edges; /* Speculative scheduling functions. */ static bool check_live_1 (int, rtx); static void update_live_1 (int, rtx); -static bool is_pfree (rtx, int, int); +static bool is_pfree (rtx_insn *, int, int); static bool find_conditional_protection (rtx_insn *, int); -static bool is_conditionally_protected (rtx, int, int); -static bool is_prisky (rtx, int, int); +static bool is_conditionally_protected (rtx_insn *, int, int); +static bool is_prisky (rtx_insn *, int, int); static bool is_exception_free (rtx_insn *, int, int); static bool sets_likely_spilled (rtx); @@ -1856,7 +1856,7 @@ update_live (rtx_insn *insn, int src) /* Turns on the fed_by_spec_load flag for insns fed by load_insn. */ static void -set_spec_fed (rtx load_insn) +set_spec_fed (rtx_insn *load_insn) { sd_iterator_def sd_it; dep_t dep; @@ -1907,7 +1907,7 @@ find_conditional_protection (rtx_insn *insn, int load_insn_bb) Locate the branch by following INSN_FORW_DEPS from insn1. */ static bool -is_conditionally_protected (rtx load_insn, int bb_src, int bb_trg) +is_conditionally_protected (rtx_insn *load_insn, int bb_src, int bb_trg) { sd_iterator_def sd_it; dep_t dep; @@ -1958,7 +1958,7 @@ is_conditionally_protected (rtx load_insn, int bb_src, int bb_trg) load2 anyhow. */ static bool -is_pfree (rtx load_insn, int bb_src, int bb_trg) +is_pfree (rtx_insn *load_insn, int bb_src, int bb_trg) { sd_iterator_def back_sd_it; dep_t back_dep; @@ -2010,7 +2010,7 @@ is_pfree (rtx load_insn, int bb_src, int bb_trg) a compare on load_insn's address). */ static bool -is_prisky (rtx load_insn, int bb_src, int bb_trg) +is_prisky (rtx_insn *load_insn, int bb_src, int bb_trg) { if (FED_BY_SPEC_LOAD (load_insn)) return true; @@ -2085,7 +2085,7 @@ static ds_t new_ready (rtx_insn *, ds_t); static bool schedule_more_p (void); static const char *rgn_print_insn (const rtx_insn *, int); static int rgn_rank (rtx_insn *, rtx_insn *); -static void compute_jump_reg_dependencies (rtx, regset); +static void compute_jump_reg_dependencies (rtx_insn *, regset); /* Functions for speculative scheduling. */ static void rgn_add_remove_insn (rtx_insn *, int); @@ -2335,7 +2335,7 @@ contributes_to_priority (rtx_insn *next, rtx_insn *insn) considered as used by this jump in USED. */ static void -compute_jump_reg_dependencies (rtx insn ATTRIBUTE_UNUSED, +compute_jump_reg_dependencies (rtx_insn *insn ATTRIBUTE_UNUSED, regset used ATTRIBUTE_UNUSED) { /* Nothing to do here, since we postprocess jumps in diff --git a/gcc/sel-sched-dump.cc b/gcc/sel-sched-dump.cc index e0f20801fa6a..f6c89a6a356c 100644 --- a/gcc/sel-sched-dump.cc +++ b/gcc/sel-sched-dump.cc @@ -116,7 +116,7 @@ sel_print_rtl (rtx x) /* Dump insn INSN honoring FLAGS. */ void -dump_insn_rtx_1 (rtx insn, int flags) +dump_insn_rtx_1 (rtx_insn *insn, int flags) { int all; @@ -146,7 +146,7 @@ dump_insn_rtx_1 (rtx insn, int flags) /* Dump INSN with default flags. */ void -dump_insn_rtx (rtx insn) +dump_insn_rtx (rtx_insn *insn) { dump_insn_rtx_1 (insn, dump_insn_rtx_flags); } @@ -154,7 +154,7 @@ dump_insn_rtx (rtx insn) /* Dump INSN to stderr. */ DEBUG_FUNCTION void -debug_insn_rtx (rtx insn) +debug_insn_rtx (rtx_insn *insn) { switch_dump (stderr); dump_insn_rtx_1 (insn, debug_insn_rtx_flags); diff --git a/gcc/sel-sched-dump.h b/gcc/sel-sched-dump.h index 8a9acc4998eb..9b8408eb323b 100644 --- a/gcc/sel-sched-dump.h +++ b/gcc/sel-sched-dump.h @@ -81,9 +81,9 @@ enum dump_insn_rtx_def | DUMP_INSN_RTX_BBN) }; -extern void dump_insn_rtx_1 (rtx, int); -extern void dump_insn_rtx (rtx); -extern void debug_insn_rtx (rtx); +extern void dump_insn_rtx_1 (rtx_insn *, int); +extern void dump_insn_rtx (rtx_insn *); +extern void debug_insn_rtx (rtx_insn *); /* These values control dumping of vinsns. The meaning of different fields of a vinsn is explained in sel-sched-ir.h. */ diff --git a/gcc/sel-sched-ir.cc b/gcc/sel-sched-ir.cc index bae404657dd2..9d692b7d605d 100644 --- a/gcc/sel-sched-ir.cc +++ b/gcc/sel-sched-ir.cc @@ -1480,7 +1480,7 @@ find_in_history_vect_1 (vec<expr_history_def> vect, the position found or -1, if no such value is in vector. Search also for UIDs of insn's originators, if ORIGINATORS_P is true. */ int -find_in_history_vect (vec<expr_history_def> vect, rtx insn, +find_in_history_vect (vec<expr_history_def> vect, rtx_insn *insn, vinsn_t new_vinsn, bool originators_p) { int ind; @@ -3597,7 +3597,7 @@ insn_sid (insn_t insn) at the data structures of the selective scheduler, not by examining the pattern. */ bool -sel_insn_is_speculation_check (rtx insn) +sel_insn_is_speculation_check (rtx_insn *insn) { return s_i_d.exists () && !! INSN_SPEC_CHECKED_DS (insn); } @@ -3605,7 +3605,7 @@ sel_insn_is_speculation_check (rtx insn) /* Extracts machine mode MODE and destination location DST_LOC for given INSN. */ void -get_dest_and_mode (rtx insn, rtx *dst_loc, machine_mode *mode) +get_dest_and_mode (rtx_insn *insn, rtx *dst_loc, machine_mode *mode) { rtx pat = PATTERN (insn); @@ -5758,7 +5758,7 @@ create_vinsn_from_insn_rtx (rtx_insn *insn_rtx, bool force_unique_p) /* Create a copy of INSN_RTX. */ rtx_insn * -create_copy_of_insn_rtx (rtx insn_rtx) +create_copy_of_insn_rtx (rtx_insn *insn_rtx) { rtx_insn *res; rtx link; diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h index c77148188404..d6af054dfb73 100644 --- a/gcc/sel-sched-ir.h +++ b/gcc/sel-sched-ir.h @@ -1503,7 +1503,7 @@ extern void clear_expr (expr_t); extern unsigned expr_dest_regno (expr_t); extern rtx expr_dest_reg (expr_t); extern int find_in_history_vect (vec<expr_history_def> , - rtx, vinsn_t, bool); + rtx_insn *, vinsn_t, bool); extern void insert_in_history_vect (vec<expr_history_def> *, unsigned, enum local_trans_type, vinsn_t, vinsn_t, ds_t); @@ -1540,7 +1540,7 @@ extern int tick_check_p (expr_t, deps_t, fence_t); /* Functions to work with insns. */ extern bool lhs_of_insn_equals_to_dest_p (insn_t, rtx); -extern void get_dest_and_mode (rtx, rtx *, machine_mode *); +extern void get_dest_and_mode (rtx_insn *, rtx *, machine_mode *); extern bool bookkeeping_can_be_created_if_moved_through_p (insn_t); extern bool sel_remove_insn (insn_t, bool, bool); @@ -1595,7 +1595,7 @@ extern void sel_unregister_cfg_hooks (void); /* Expression transformation routines. */ extern rtx_insn *create_insn_rtx_from_pattern (rtx, rtx); extern vinsn_t create_vinsn_from_insn_rtx (rtx_insn *, bool); -extern rtx_insn *create_copy_of_insn_rtx (rtx); +extern rtx_insn *create_copy_of_insn_rtx (rtx_insn *); extern void change_vinsn_in_expr (expr_t, vinsn_t); /* Various initialization functions. */ diff --git a/gcc/sel-sched.cc b/gcc/sel-sched.cc index 08ae0ae019a4..5f5ac727c8fe 100644 --- a/gcc/sel-sched.cc +++ b/gcc/sel-sched.cc @@ -592,7 +592,7 @@ advance_one_cycle (fence_t fence) /* Returns true when SUCC in a fallthru bb of INSN, possibly skipping empty basic blocks. */ static bool -in_fallthru_bb_p (rtx_insn *insn, rtx succ) +in_fallthru_bb_p (rtx_insn *insn, rtx_insn *succ) { basic_block bb = BLOCK_FOR_INSN (insn); edge e; @@ -3673,7 +3673,7 @@ vinsn_vec_free (vinsn_vec_t &vinsn_vec) /* Increase EXPR_PRIORITY_ADJ for INSN by AMOUNT. */ -void sel_add_to_insn_priority (rtx insn, int amount) +void sel_add_to_insn_priority (rtx_insn *insn, int amount) { EXPR_PRIORITY_ADJ (INSN_EXPR (insn)) += amount;
