* [PATCH, SMS] New flag to apply SMS when SC equals 1
@ 2011-04-15 15:39 Revital Eres
2011-04-15 16:07 ` Richard Guenther
0 siblings, 1 reply; 3+ messages in thread
From: Revital Eres @ 2011-04-15 15:39 UTC (permalink / raw)
To: zaks, gcc-patches; +Cc: Patch Tracking
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
Hello,
The attached patch introduces a new flag to allow applying SMS when
stage count (SC) also equals 1.
Currently, SMS is applied only when SC greater than 1 as stage count
of 1 means that there is no interleaving between iterations and the
scheduling passes do the job in this case.
The new flag is introduced for debugging purposes to apply SMS
on more loops.
Bootstrap and regtest on ppc64-redhat-linux.
OK for mainline?
Thanks,
Revital
Changelog:
* common.opt (fmodulo-sched-allow-sc-one): New flag.
* modulo-sched.c (sms_schedule): Allow SMS when stage count
equals one and -fmodulo-sched-allow-sc-one flag is set.
[-- Attachment #2: sms_flag_10_4.txt --]
[-- Type: text/plain, Size: 1303 bytes --]
=== modified file 'gcc/common.opt'
--- gcc/common.opt 2011-03-06 00:38:13 +0000
+++ gcc/common.opt 2011-04-10 11:46:08 +0000
@@ -1395,6 +1395,10 @@ fmodulo-sched-allow-regmoves
Common Report Var(flag_modulo_sched_allow_regmoves)
Perform SMS based modulo scheduling with register moves allowed
+fmodulo-sched-allow-sc-one
+Common Report Var(flag_modulo_sched_allow_sc_one)
+Perform SMS based modulo scheduling also when stage count equals one
+
fmove-loop-invariants
Common Report Var(flag_move_loop_invariants) Init(1) Optimization
Move loop invariant computations out of loops
=== modified file 'gcc/modulo-sched.c'
--- gcc/modulo-sched.c 2011-03-27 07:11:08 +0000
+++ gcc/modulo-sched.c 2011-04-10 11:45:17 +0000
@@ -1223,8 +1223,10 @@ sms_schedule (void)
}
/* Stage count of 1 means that there is no interleaving between
- iterations, let the scheduling passes do the job. */
- if (stage_count <= 1
+ iterations, let the scheduling passes do the job unless
+ -fmodulo-sched-allow-sc-one flag is set. */
+ if ((!flag_modulo_sched_allow_sc_one && (stage_count == 1))
+ || (stage_count < 1)
|| (count_init && (loop_count <= stage_count))
|| (flag_branch_probabilities && (trip_count <= stage_count)))
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, SMS] New flag to apply SMS when SC equals 1
2011-04-15 15:39 [PATCH, SMS] New flag to apply SMS when SC equals 1 Revital Eres
@ 2011-04-15 16:07 ` Richard Guenther
2011-04-16 6:34 ` Revital Eres
0 siblings, 1 reply; 3+ messages in thread
From: Richard Guenther @ 2011-04-15 16:07 UTC (permalink / raw)
To: Revital Eres; +Cc: zaks, gcc-patches, Patch Tracking
On Fri, Apr 15, 2011 at 5:28 PM, Revital Eres <revital.eres@linaro.org> wrote:
> Hello,
>
> The attached patch introduces a new flag to allow applying SMS when
> stage count (SC) also equals 1.
> Currently, SMS is applied only when SC greater than 1 as stage count
> of 1 means that there is no interleaving between iterations and the
> scheduling passes do the job in this case.
> The new flag is introduced for debugging purposes to apply SMS
> on more loops.
>
> Bootstrap and regtest on ppc64-redhat-linux.
>
> OK for mainline?
If it's for debugging, can you use a --parm instead (like
modulo-sched-min-sc or similar)?
Thanks,
Richard.
> Thanks,
> Revital
>
> Changelog:
>
> * common.opt (fmodulo-sched-allow-sc-one): New flag.
> * modulo-sched.c (sms_schedule): Allow SMS when stage count
> equals one and -fmodulo-sched-allow-sc-one flag is set.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, SMS] New flag to apply SMS when SC equals 1
2011-04-15 16:07 ` Richard Guenther
@ 2011-04-16 6:34 ` Revital Eres
0 siblings, 0 replies; 3+ messages in thread
From: Revital Eres @ 2011-04-16 6:34 UTC (permalink / raw)
To: Richard Guenther; +Cc: zaks, gcc-patches, Patch Tracking
Hello,
> If it's for debugging, can you use a --parm instead (like
> modulo-sched-min-sc or similar)?
>
I think I can use --param for debugging purposes in this case.
(I might add modulo-sched-max-sc as well)
Thanks,
Revital
> Thanks,
> Richard.
>
>> Thanks,
>> Revital
>>
>> Changelog:
>>
>> * common.opt (fmodulo-sched-allow-sc-one): New flag.
>> * modulo-sched.c (sms_schedule): Allow SMS when stage count
>> equals one and -fmodulo-sched-allow-sc-one flag is set.
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-16 3:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-15 15:39 [PATCH, SMS] New flag to apply SMS when SC equals 1 Revital Eres
2011-04-15 16:07 ` Richard Guenther
2011-04-16 6:34 ` Revital Eres
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).