This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] minor typo in modulo-sched.c
- From: "Bingfeng Mei" <bmei at broadcom dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: "Revital1 Eres" <ERES at il dot ibm dot com>, "Ayal Zaks" <ZAKS at il dot ibm dot com>
- Date: Tue, 7 Jul 2009 08:52:27 -0700
- Subject: [patch] minor typo in modulo-sched.c
Hello,
I believe from how stage_count is calculated
#define PS_STAGE_COUNT(ps) ((PS_MAX_CYCLE (ps) - PS_MIN_CYCLE (ps) \
+ 1 + (ps)->ii - 1) / (ps)->ii)
it is always equal or bigger than 1. So the following check in the code
is not correct. OK for trunk?
Cheers,
Bingfeng Mei
Broadcom UK
2009-07-07 Bingfeng Mei <bmei@broadcom.com>
* modulo-sched.c (sms_schedule): stage_count <= 1 as correct comparison
Index: modulo-sched.c
===================================================================
--- modulo-sched.c (revision 149334)
+++ modulo-sched.c (working copy)
@@ -1161,7 +1161,7 @@
/* 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)))
{