Hello,
Following Richard's suggestion here is the patch again.
Tested on ppc64-redhat-linux.
OK for mainline?
Thanks,
Revital
Changelog
* params.def (sms-min-sc): New param flag.
* modulo-sched.c (sms_schedule): Use it.
=== modified file 'gcc/modulo-sched.c'
--- gcc/modulo-sched.c 2011-03-27 07:11:08 +0000
+++ gcc/modulo-sched.c 2011-04-17 06:24:21 +0000
@@ -1222,9 +1222,10 @@ sms_schedule (void)
PS_STAGE_COUNT(ps) = stage_count;
}
- /* Stage count of 1 means that there is no interleaving between
- iterations, let the scheduling passes do the job. */
- if (stage_count <= 1
+ /* 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 < (unsigned) PARAM_VALUE (PARAM_SMS_MIN_SC)
|| (count_init && (loop_count <= stage_count))
|| (flag_branch_probabilities && (trip_count <= stage_count)))
{
=== modified file 'gcc/params.def'
--- gcc/params.def 2011-02-02 15:52:08 +0000
+++ gcc/params.def 2011-04-17 05:48:44 +0000
@@ -344,6 +344,11 @@ DEFPARAM(PARAM_SMS_MAX_II_FACTOR,
"sms-max-ii-factor",
"A factor for tuning the upper bound that swing modulo scheduler uses
for scheduling a loop",
100, 0, 0)
+/* The minimum value of stage count that swing modulo scheduler will generate.
*/
+DEFPARAM(PARAM_SMS_MIN_SC,
+ "sms-min-sc",
+ "The minimum value of stage count that swing modulo scheduler will
generate.",
+ 2, 1, 1)
DEFPARAM(PARAM_SMS_DFA_HISTORY,
"sms-dfa-history",
"The number of cycles the swing modulo scheduler considers when
checking conflicts using DFA",