This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: verify block note nesting


Oh, I almost forgot.  That remove_unnecessary_notes patch
calls the lists.c routines earlier than we'd done before,
which means they need initializing earlier.


r~

        * lists.c (init_EXPR_INSN_LIST_cache): Don't check initialized.
        * toplev.c (rest_of_compilation): Call init_EXPR_INSN_LIST_cache ...
        (compile_file): ... here.

Index: lists.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/lists.c,v
retrieving revision 1.7
diff -c -p -d -r1.7 lists.c
*** lists.c	2000/10/13 06:26:27	1.7
--- lists.c	2001/03/07 18:42:26
*************** zap_lists (dummy)
*** 121,132 ****
  void 
  init_EXPR_INSN_LIST_cache ()
  {
!   static int initialized;
!   if (!initialized)
!     {
!       initialized = 1;
!       ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
!     }
  }
  
  /* This function will free up an entire list of EXPR_LIST nodes.  */
--- 121,127 ----
  void 
  init_EXPR_INSN_LIST_cache ()
  {
!   ggc_add_root (&unused_expr_list, 1, 1, zap_lists);
  }
  
  /* This function will free up an entire list of EXPR_LIST nodes.  */
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.433
diff -c -p -d -r1.433 toplev.c
*** toplev.c	2001/03/05 12:17:45	1.433
--- toplev.c	2001/03/07 18:42:27
*************** compile_file (name)
*** 2171,2176 ****
--- 2171,2177 ----
    init_function_once ();
    init_stor_layout_once ();
    init_varasm_once ();
+   init_EXPR_INSN_LIST_cache ();
  
    /* The following initialization functions need to generate rtl, so
       provide a dummy function context for them.  */
*************** rest_of_compilation (decl)
*** 2860,2867 ****
        if (DECL_EXTERNAL (decl))
  	goto exit_rest_of_compilation;
      }
- 
-   init_EXPR_INSN_LIST_cache ();
  
    ggc_collect ();
  
--- 2861,2866 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]