lists.c tweek

Richard Henderson rth@cygnus.com
Fri Oct 8 12:00:00 GMT 1999


Self-evident.


r~


        * lists.c (init_EXPR_INSN_LIST_cache): Don't need to zap the
        cache every function if ggc_p.

Index: lists.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/lists.c,v
retrieving revision 1.4
diff -c -p -d -r1.4 lists.c
*** lists.c	1999/10/03 16:28:33	1.4
--- lists.c	1999/10/08 18:58:19
*************** zap_lists (dummy)
*** 120,134 ****
  void 
  init_EXPR_INSN_LIST_cache ()
  {
!   static int initialized;
!   if (!initialized)
      {
!       initialized = 1;
!       ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
      }
!     
!   unused_expr_list = NULL;
!   unused_insn_list = NULL;
  }
  
  /* This function will free up an entire list of EXPR_LIST nodes.  */
--- 120,141 ----
  void 
  init_EXPR_INSN_LIST_cache ()
  {
!   if (ggc_p)
      {
!       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;
!     }
  }
  
  /* This function will free up an entire list of EXPR_LIST nodes.  */


More information about the Gcc-patches mailing list