aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
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 /gcc/loop.c
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
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c7
1 files changed, 6 insertions, 1 deletions
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;