OSDN Git Service

2009-07-16 Bingfeng Mei <bmei@broadcom.com>
authormeibf <meibf@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Jul 2009 16:20:28 +0000 (16:20 +0000)
committermeibf <meibf@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Jul 2009 16:20:28 +0000 (16:20 +0000)
* modulo-sched.c (sms_schedule): stage_count <= 1 as correct comparison
        to skip unprofitable schedule

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149712 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/modulo-sched.c

index 6612ad4..ba80a32 100644 (file)
@@ -1,3 +1,8 @@
+2009-07-16  Bingfeng Mei  <bmei@broadcom.com>
+
+       * modulo-sched.c (sms_schedule): stage_count <= 1 as correct comparison
+        to skip unprofitable schedule
+        
 2009-07-16  Simon Baldwin  <simonb@google.com>
 
        * gcc.c (option_map): New flag -no-canonical-prefixes.
index dbe77d9..5176880 100644 (file)
@@ -1157,12 +1157,14 @@ sms_schedule (void)
 
       ps = sms_schedule_by_order (g, mii, maxii, node_order);
 
-      if (ps)
+      if (ps){
        stage_count = PS_STAGE_COUNT (ps);
+        gcc_assert(stage_count >= 1);
+      }  
 
       /* Stage count of 1 means that there is no interleaving between
          iterations, let the scheduling passes do the job.  */
-      if (stage_count < 1
+      if (stage_count <= 1
          || (count_init && (loop_count <= stage_count))
          || (flag_branch_probabilities && (trip_count <= stage_count)))
        {