cse.c (fold_rtx): Instantiate CONSTANT_P_RTX to 0 when not optimizing, even if flag_g...
authorRoger Sayle <roger@eyesopen.com>
Sat, 25 Jan 2003 17:37:42 +0000 (17:37 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sat, 25 Jan 2003 17:37:42 +0000 (17:37 +0000)
* cse.c (fold_rtx): Instantiate CONSTANT_P_RTX to 0 when not
optimizing, even if flag_gcse is true.
* toplev.c (rest_of_compilation): purge_builtin_constant_p
only needs to be called when "optimize > 0 && flag_gcse".

From-SVN: r61785

gcc/ChangeLog
gcc/cse.c
gcc/toplev.c

index b4fe9b433dc4f1d345179b760442631369278efd..8f0f8bd6d0aa0fa408d468d448e5ef6c893f5586 100644 (file)
@@ -1,3 +1,10 @@
+2002-01-25  Roger Sayle  <roger@eyesopen.com>
+
+       * cse.c (fold_rtx): Instantiate CONSTANT_P_RTX to 0 when not
+       optimizing, even if flag_gcse is true.
+       * toplev.c (rest_of_compilation): purge_builtin_constant_p
+       only needs to be called when "optimize > 0 && flag_gcse".
+
 2003-01-25  Roger Sayle  <roger@eyesopen.com>
 
        * stmt.c (emit_case_bit_tests): New routine to implement suitable
index 180c31e96358e8d6ef1ee5a74ad4b6dd0ebef015..e2a04e59398e7d8f240f1ca20fe02f8ba4dd34cb 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -4338,7 +4338,7 @@ fold_rtx (x, insn)
        {
          if (const_arg0)
            return const1_rtx;
-         if (!flag_gcse)
+         if (optimize == 0 || !flag_gcse)
            return const0_rtx;
        }
       break;
index 1ab3f82007bab291afaf12f14d7625324c888f27..60370c29213bf59c4685a15769cac1f6e4aaf75f 100644 (file)
@@ -2925,7 +2925,8 @@ rest_of_compilation (decl)
     }
 
   /* Instantiate any remaining CONSTANT_P_RTX nodes.  */
-  purge_builtin_constant_p ();
+  if (optimize > 0 && flag_gcse)
+    purge_builtin_constant_p ();
 
   /* Move constant computations out of loops.  */