From patchwork Sun Apr 17 11:41:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Revital Eres X-Patchwork-Id: 1056 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:48:40 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.148 with SMTP id r20cs5521qai; Sun, 17 Apr 2011 04:41:57 -0700 (PDT) Received: by 10.213.9.66 with SMTP id k2mr1640202ebk.22.1303040517106; Sun, 17 Apr 2011 04:41:57 -0700 (PDT) Received: from mail-ew0-f50.google.com (mail-ew0-f50.google.com [209.85.215.50]) by mx.google.com with ESMTPS id s50si10019207eei.107.2011.04.17.04.41.55 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Apr 2011 04:41:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) client-ip=209.85.215.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) smtp.mail=revital.eres@linaro.org Received: by ewy10 with SMTP id 10so1316073ewy.37 for ; Sun, 17 Apr 2011 04:41:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.96.71 with SMTP id g7mr3502787ebn.69.1303040515248; Sun, 17 Apr 2011 04:41:55 -0700 (PDT) Received: by 10.213.10.144 with HTTP; Sun, 17 Apr 2011 04:41:55 -0700 (PDT) In-Reply-To: References: Date: Sun, 17 Apr 2011 14:41:55 +0300 Message-ID: Subject: Re: [PATCH] New flag to apply SMS when SC equals 1 (Second try) From: Revital Eres To: Richard Guenther Cc: gcc-patches@gcc.gnu.org, zaks@il.ibm.com, Patch Tracking Hello, > > New params need documentation in doc/invoke.texi.  Please also change the > maximum value to 2, not 1.  Ok with that changes. When changing the max value to 2, any value that is greater than 2 is rejected due to the following comment in params.def: - The maximum acceptable value for the parameter (if greater than the minimum). So I'll leave the maximum value to be 1 if that's OK. I added the documentation in invoke.taxi. Thanks, Revital * params.def (sms-min-sc): New param flag. * modulo-sched.c (sms_schedule): Use it. * doc/invoke.texi (sms-min-sc): Document it. === modified file 'gcc/doc/invoke.texi' --- gcc/doc/invoke.texi 2011-03-07 03:00:04 +0000 +++ gcc/doc/invoke.texi 2011-04-17 11:28:33 +0000 @@ -8718,6 +8718,10 @@ through which the instruction may be pip The maximum number of best instructions in the ready list that are considered for renaming in the selective scheduler. The default value is 2. +@item sms-min-sc +The minimum value of stage count that swing modulo scheduler will +generate. The default value is 2. + @item max-last-value-rtl The maximum size measured as number of RTLs that can be recorded in an expression in combiner for a pseudo register as last known value of that register. The default === modified file 'gcc/modulo-sched.c' --- gcc/modulo-sched.c 2011-03-27 07:11:08 +0000 +++ gcc/modulo-sched.c 2011-04-17 10:53:03 +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 11:16:03 +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",