]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
flags.h (flag_rerun_loop_opt): Declare.
authorJim Wilson <wilson@cygnus.com>
Fri, 7 Nov 1997 23:36:53 +0000 (23:36 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 7 Nov 1997 23:36:53 +0000 (16:36 -0700)
        * 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: r16362

gcc/ChangeLog
gcc/flags.h
gcc/loop.c
gcc/toplev.c

index 0c7db123279ebce24cda2a68a37c26cbe1fc0d25..d64890eff37c33d18b451f20d95497cef3385363 100644 (file)
@@ -1,3 +1,9 @@
+Fri Nov  7 16:23:20 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.
+
 Fri Nov  7 10:22:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * frame.c (add_fdes, count_fdes): Go back to checking pc_begin for
index 5b3c7639e06489c4f7b9bd0edc6552fe1da8df3a..ba057204dede483656eeeb5295fb2bb532ee5b32 100644 (file)
@@ -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.  */
 
index 73f347fd86f32e755cf06aed5dfbefb3f052f66a..4bd965d49a55a72934e16591c43fba420704bce2 100644 (file)
@@ -2833,7 +2833,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;
index c36554f1c83e75ca9209fa76d4ccd78dfd3ddd29..fbde9e2796f1ba6581f6be1ddfe0832fc5ef4ac3 100644 (file)
@@ -507,7 +507,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.  */