lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the cache every function if...
authorRichard Henderson <rth@cygnus.com>
Fri, 8 Oct 1999 18:59:27 +0000 (11:59 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 8 Oct 1999 18:59:27 +0000 (11:59 -0700)
        * lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the
        cache every function if ggc_p.

From-SVN: r29872

gcc/ChangeLog
gcc/lists.c

index dfe8f967d996d2c5c35ba69c10b08cbee237ea35..73b48438f054be23eefb22bd56368894cdab4652 100644 (file)
@@ -1,3 +1,8 @@
+Fri Oct  8 11:58:34 1999  Richard Henderson  <rth@cygnus.com>
+
+       * lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the
+       cache every function if ggc_p.
+
 Fri Oct  8 18:46:11 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
 
        * jump.c (duplicate_loop_exit_test): Use copy_insn/copy_insn_1
index 90b67966b1542539a236b03b8ffc8487573cc899..8c622a6a153637729bb0913934911b6d57dc7e45 100644 (file)
@@ -120,15 +120,22 @@ zap_lists (dummy)
 void 
 init_EXPR_INSN_LIST_cache ()
 {
-  static int initialized;
-  if (!initialized)
+  if (ggc_p)
     {
-      initialized = 1;
-      ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
+      static int initialized;
+      if (!initialized)
+        {
+          initialized = 1;
+          ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
+        }
+
+      /* No need to squish the lists across functions with GC enabled.  */
+    }
+  else
+    {
+      unused_expr_list = NULL;
+      unused_insn_list = NULL;
     }
-    
-  unused_expr_list = NULL;
-  unused_insn_list = NULL;
 }
 
 /* This function will free up an entire list of EXPR_LIST nodes.  */