public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Revital Eres <revital.eres@linaro.org>
To: zaks@il.ibm.com, gcc-patches@gcc.gnu.org
Cc: Patch Tracking <patches@linaro.org>
Subject: [PATCH, SMS] New flag to apply SMS when SC equals 1
Date: Fri, 15 Apr 2011 15:39:00 -0000	[thread overview]
Message-ID: <BANLkTim7EemZAcCqtXAO61q7ViGa_A+cpw@mail.gmail.com> (raw)

[-- 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)))
 	{


             reply	other threads:[~2011-04-15 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 15:39 Revital Eres [this message]
2011-04-15 16:07 ` Richard Guenther
2011-04-16  6:34   ` Revital Eres

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTim7EemZAcCqtXAO61q7ViGa_A+cpw@mail.gmail.com \
    --to=revital.eres@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=patches@linaro.org \
    --cc=zaks@il.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).