aboutsummaryrefslogtreecommitdiff
path: root/gcc/sched-int.h
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2023-07-05 13:22:18 +0200
committerUros Bizjak <ubizjak@gmail.com>2023-07-05 16:58:17 +0200
commita4778dbd935d4e26b41e5c0e6191b7311457b239 (patch)
treee16738bc454207d60d785c0161d382c1cf856cc7 /gcc/sched-int.h
parentc30efd8cd634f8a59bc1bf52e71d8866bf52d56c (diff)
downloadgcc-a4778dbd935d4e26b41e5c0e6191b7311457b239.zip
gcc-a4778dbd935d4e26b41e5c0e6191b7311457b239.tar.gz
gcc-a4778dbd935d4e26b41e5c0e6191b7311457b239.tar.bz2
sched: Change return type of predicate functions from int to bool
Also change some internal variables to bool. gcc/ChangeLog: * sched-int.h (struct haifa_sched_info): Change can_schedule_ready_p, scehdule_more_p and contributes_to_priority indirect frunction type from int to bool. (no_real_insns_p): Change return type from int to bool. (contributes_to_priority): Ditto. * haifa-sched.cc (no_real_insns_p): Change return type from int to bool and adjust function body accordingly. * modulo-sched.cc (try_scheduling_node_in_cycle): Change "success" variable type from int to bool. (ps_insn_advance_column): Change return type from int to bool. (ps_has_conflicts): Ditto. Change "has_conflicts" variable type from int to bool. * sched-deps.cc (deps_may_trap_p): Change return type from int to bool. (conditions_mutex_p): Ditto. * sched-ebb.cc (schedule_more_p): Ditto. (ebb_contributes_to_priority): Change return type from int to bool and adjust function body accordingly. * sched-rgn.cc (is_cfg_nonregular): Ditto. (check_live_1): Ditto. (is_pfree): Ditto. (find_conditional_protection): Ditto. (is_conditionally_protected): Ditto. (is_prisky): Ditto. (is_exception_free): Ditto. (haifa_find_rgns): Change "unreachable" and "too_large_failure" variables from int to bool. (extend_rgns): Change "rescan" variable from int to bool. (check_live): Change return type from int to bool and adjust function body accordingly. (can_schedule_ready_p): Ditto. (schedule_more_p): Ditto. (contributes_to_priority): Ditto.
Diffstat (limited to 'gcc/sched-int.h')
-rw-r--r--gcc/sched-int.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index 97b7d2d..64a2f0b 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -585,11 +585,11 @@ struct haifa_sched_info
/* Add all insns that are initially ready to the ready list. Called once
before scheduling a set of insns. */
void (*init_ready_list) (void);
- /* Called after taking an insn from the ready list. Returns nonzero if
- this insn can be scheduled, nonzero if we should silently discard it. */
- int (*can_schedule_ready_p) (rtx_insn *);
- /* Return nonzero if there are more insns that should be scheduled. */
- int (*schedule_more_p) (void);
+ /* Called after taking an insn from the ready list. Returns true if
+ this insn can be scheduled, false if we should silently discard it. */
+ bool (*can_schedule_ready_p) (rtx_insn *);
+ /* Return true if there are more insns that should be scheduled. */
+ bool (*schedule_more_p) (void);
/* Called after an insn has all its hard dependencies resolved.
Adjusts status of instruction (which is passed through second parameter)
to indicate if instruction should be moved to the ready list or the
@@ -605,9 +605,9 @@ struct haifa_sched_info
static buffer for this. The ALIGNED parameter should cause the string
to be formatted so that multiple output lines will line up nicely. */
const char *(*print_insn) (const rtx_insn *, int);
- /* Return nonzero if an insn should be included in priority
+ /* Return true if an insn should be included in priority
calculations. */
- int (*contributes_to_priority) (rtx_insn *, rtx_insn *);
+ bool (*contributes_to_priority) (rtx_insn *, rtx_insn *);
/* Return true if scheduling insn (passed as the parameter) will trigger
finish of scheduling current block. */
@@ -1397,7 +1397,7 @@ extern void free_global_sched_pressure_data (void);
extern int haifa_classify_insn (const_rtx);
extern void get_ebb_head_tail (basic_block, basic_block,
rtx_insn **, rtx_insn **);
-extern int no_real_insns_p (const rtx_insn *, const rtx_insn *);
+extern bool no_real_insns_p (const rtx_insn *, const rtx_insn *);
extern int insn_sched_cost (rtx_insn *);
extern int dep_cost_1 (dep_t, dw_t);
@@ -1509,7 +1509,7 @@ extern void dump_rgn_dependencies_dot (FILE *);
extern void dump_rgn_dependencies_dot (const char *);
extern void free_rgn_deps (void);
-extern int contributes_to_priority (rtx_insn *, rtx_insn *);
+extern bool contributes_to_priority (rtx_insn *, rtx_insn *);
extern void extend_rgns (int *, int *, sbitmap, int *);
extern void deps_join (class deps_desc *, class deps_desc *);