aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1997-11-09 08:35:46 +0000
committerJeff Law <law@gcc.gnu.org>1997-11-09 01:35:46 -0700
commit64fde7010b6a3a678df227c06df09815d3aaec2b (patch)
tree12af167c241103efc33f01c8678cdd994064d5a1
parent69f9c1f69e285e99979f61452634874744998481 (diff)
downloadgcc-64fde7010b6a3a678df227c06df09815d3aaec2b.zip
gcc-64fde7010b6a3a678df227c06df09815d3aaec2b.tar.gz
gcc-64fde7010b6a3a678df227c06df09815d3aaec2b.tar.bz2
flags.h (flag_rerun_loop_opt): Declare.
* flags.h (flag_rerun_loop_opt): Declare. * loop.c (invariant_p, case LABEL_REF): Check flag_rerun_loop_opt. * toplev.c (flag_rerum_loop_opt): Delete static. From-SVN: r16389
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/flags.h4
-rw-r--r--gcc/loop.c7
-rw-r--r--gcc/toplev.c2
4 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5db233f..aaaa939 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Sun Nov 9 01:37:11 1997 Jim Wilson (wilson@cygnus.com)
+
+ * flags.h (flag_rerun_loop_opt): Declare.
+ * loop.c (invariant_p, case LABEL_REF): Check flag_rerun_loop_opt.
+ * toplev.c (flag_rerum_loop_opt): Delete static.
+
Sat Nov 8 18:20:21 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h (ENABLE_REGMOVE_PASS): Define.
diff --git a/gcc/flags.h b/gcc/flags.h
index 5b3c763..ba05720 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -275,6 +275,10 @@ extern int flag_volatile_global;
extern int flag_fast_math;
+/* Nonzero means to run loop optimizations twice. */
+
+extern int flag_rerun_loop_opt;
+
/* Nonzero means make functions that look like good inline candidates
go inline. */
diff --git a/gcc/loop.c b/gcc/loop.c
index 70f1551..e43d585 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -2847,7 +2847,12 @@ invariant_p (x)
We don't know the loop bounds here though, so just fail for all
labels. */
- if (flag_unroll_loops)
+ /* ??? This is also necessary if flag_rerun_loop_opt is true, because in
+ this case we may be doing loop unrolling the second time we run loop,
+ and hence the first loop run also needs this check. There is no way
+ to check here whether the second run will actually do loop unrolling
+ though, as that info is in a local var in rest_of_compilation. */
+ if (flag_unroll_loops || flag_rerun_loop_opt)
return 0;
else
return 1;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 956d78e..aeffbb3 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -508,7 +508,7 @@ static int flag_rerun_cse_after_loop;
/* Nonzero means to run loop optimizations twice. */
-static int flag_rerun_loop_opt;
+int flag_rerun_loop_opt;
/* Nonzero for -finline-functions: ok to inline functions that look like
good inline candidates. */