* cse.c (fold_rtx): Instantiate CONSTANT_P_RTX to 0 when not
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Jan 2003 17:37:42 +0000 (17:37 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Jan 2003 17:37:42 +0000 (17:37 +0000)
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".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61785 138bc75d-0d04-0410-961f-82ee72b054a4

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

index b4fe9b4..8f0f8bd 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 180c31e..e2a04e5 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 1ab3f82..60370c2 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.  */