diff options
author | Roman Zhuykov <zhroma@ispras.ru> | 2019-12-13 17:17:31 +0000 |
---|---|---|
committer | Roman Zhuykov <zhroma@gcc.gnu.org> | 2019-12-13 17:17:31 +0000 |
commit | c420be8b3c5fd9e9d80dd583e790f0c2a7c4954b (patch) | |
tree | 7eef17af9c7fdbe98af1f44ebe576eb45d3b3c61 /gcc/modulo-sched.c | |
parent | 728c2e5eeaa91cf708f2b1b1f996653a7eebae59 (diff) | |
download | gcc-c420be8b3c5fd9e9d80dd583e790f0c2a7c4954b.zip gcc-c420be8b3c5fd9e9d80dd583e790f0c2a7c4954b.tar.gz gcc-c420be8b3c5fd9e9d80dd583e790f0c2a7c4954b.tar.bz2 |
modulo-sched: fix parameters usage and their ranges
* modulo-sched.c (sms_schedule): Use param_sms_max_ii_factor
value instead of macro. Adjust comment.
(sms_schedule_by_order): Use parameter value without macro.
* params.opt: Add ranges for modulo scheduler parameters,
set param_sms_max_ii_factor = 2 by default.
From-SVN: r279376
Diffstat (limited to 'gcc/modulo-sched.c')
-rw-r--r-- | gcc/modulo-sched.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c index 98af549..2dc9af7 100644 --- a/gcc/modulo-sched.c +++ b/gcc/modulo-sched.c @@ -1331,9 +1331,6 @@ setup_sched_infos (void) version may be entered. Just a guess. */ #define PROB_SMS_ENOUGH_ITERATIONS 80 -/* Used to calculate the upper bound of ii. */ -#define MAXII_FACTOR 2 - /* Main entry point, perform SMS scheduling on the loops of the function that consist of single basic blocks. */ static void @@ -1597,7 +1594,7 @@ sms_schedule (void) rec_mii = sms_order_nodes (g, mii, node_order, &max_asap); mii = MAX (res_MII (g), rec_mii); mii = MAX (mii, 1); - maxii = MAX (max_asap, MAXII_FACTOR * mii); + maxii = MAX (max_asap, param_sms_max_ii_factor * mii); if (dump_file) fprintf (dump_file, "SMS iis %d %d %d (rec_mii, mii, maxii)\n", @@ -1636,7 +1633,7 @@ sms_schedule (void) gcc_assert (stage_count >= 1); } - /* The default value of PARAM_SMS_MIN_SC is 2 as stage count of + /* The default value of param_sms_min_sc is 2 as stage count of 1 means that there is no interleaving between iterations thus we let the scheduling passes do the job in this case. */ if (stage_count < param_sms_min_sc @@ -1828,11 +1825,6 @@ sms_schedule (void) The window would then start and end on the same row, but with different "must precede" and "must follow" requirements. */ -/* A limit on the number of cycles that resource conflicts can span. ??? Should - be provided by DFA, and be dependent on the type of insn scheduled. Currently - set to 0 to save compile time. */ -#define DFA_HISTORY param_sms_dfa_history - /* A threshold for the number of repeated unsuccessful attempts to insert an empty row, before we flush the partial schedule and start over. */ #define MAX_SPLIT_NUM 10 @@ -2136,7 +2128,12 @@ sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order) auto_sbitmap must_follow (num_nodes); auto_sbitmap tobe_scheduled (num_nodes); - partial_schedule_ptr ps = create_partial_schedule (ii, g, DFA_HISTORY); + /* Value of param_sms_dfa_history is a limit on the number of cycles that + resource conflicts can span. ??? Should be provided by DFA, and be + dependent on the type of insn scheduled. Set to 0 by default to save + compile time. */ + partial_schedule_ptr ps = create_partial_schedule (ii, g, + param_sms_dfa_history); bitmap_ones (tobe_scheduled); bitmap_clear (sched_nodes); |