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]
Other format: [Raw text]

Re: Kill pointers keeping gimple function body around after RTL is generated


> On Fri, Sep 03, 2004 at 10:03:20AM +0200, Jan Hubicka wrote:
> > I might break up the bsi_remove call part to separate patch if you like
> > and keep only the removal of pointer.  I need the pointers to die first
> > for the leak detection patch and poke around the ggc_freeing of
> > statements idea later once it works.
> 
> Yes please.

Hi,
So I've broke up the patch and killed that bsi_remove code.  The first
half of freeing the forgotten varrays bootstrapped/regtested
i686-pc-gnu-linux with gcac last night, the other half is in the same
testing right now but I will likely sleep once it finishes.

OK (for both if second passes)?

Honza
2004-09-02  Jan Hubicka  <jh@suse.cz>
	* tree-ssa-operands.c (fini_ssa_operands): Release the varrays.
	* tree-ssanames.c (init_ssanames): Free ssa_names.
Index: tree-ssa-operands.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-operands.c,v
retrieving revision 2.32
diff -c -3 -p -r2.32 tree-ssa-operands.c
*** tree-ssa-operands.c	25 Aug 2004 21:21:11 -0000	2.32
--- tree-ssa-operands.c	2 Sep 2004 21:54:51 -0000
*************** init_ssa_operands (void)
*** 290,295 ****
--- 290,305 ----
  void
  fini_ssa_operands (void)
  {
+   ggc_free (build_defs);
+   ggc_free (build_uses);
+   ggc_free (build_v_may_defs);
+   ggc_free (build_vuses);
+   ggc_free (build_v_must_defs);
+   build_defs = NULL;
+   build_uses = NULL;
+   build_v_may_defs = NULL;
+   build_vuses = NULL;
+   build_v_must_defs = NULL;
  }
  
  
Index: tree-ssanames.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssanames.c,v
retrieving revision 2.8
diff -c -3 -p -r2.8 tree-ssanames.c
*** tree-ssanames.c	25 Aug 2004 21:21:19 -0000	2.8
--- tree-ssanames.c	2 Sep 2004 21:54:51 -0000
*************** init_ssanames (void)
*** 155,160 ****
--- 155,162 ----
  void
  fini_ssanames (void)
  {
+   ggc_free (ssa_names);
+   ssa_names = NULL;
    free_ssanames = NULL;
  }
  

2004-09-02  Jan Hubicka  <jh@suse.cz>
	* cfgexpand.c (expand_gimple_basic_block): Remove tree statements processed.
	(tree_expand_cfg): Remove pointer to stmt_list.
Index: cfgexpand.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgexpand.c,v
retrieving revision 2.18
diff -c -3 -p -r2.18 cfgexpand.c
*************** tree_expand_cfg (void)
*** 482,488 ****
    init_block = construct_init_block ();
  
    FOR_BB_BETWEEN (bb, init_block->next_bb, EXIT_BLOCK_PTR, next_bb)
!     bb = expand_gimple_basic_block (bb, dump_file);
  
    construct_exit_block ();
  
--- 482,494 ----
    init_block = construct_init_block ();
  
    FOR_BB_BETWEEN (bb, init_block->next_bb, EXIT_BLOCK_PTR, next_bb)
!     {
!       basic_block oldbb = bb;
! 
!       bb = expand_gimple_basic_block (bb, dump_file);
!       /* Release the stmt list.  */
!       oldbb->stmt_list = NULL;
!     }
  
    construct_exit_block ();
  


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