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: [PATCH] factor out generic (de)initialization of ANTIC and AVAIL in PRE


On Fri, Jun 20, 2008 at 08:34:44PM -0400, Daniel Berlin wrote:
>On Fri, Jun 20, 2008 at 7:53 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> Hi,
>>
>> I saw this on Linux/Inte64 with C only. I am testing this
>
>
>Err this patch would be clearly wrong, it would simply cause us to leak memory.
>
>The right thing to do is to move it up above:
>  bitmap_obstack_release (&grand_bitmap_obstack);

Bootstrapped fine with all default languages on i686. Regtesting is in
progress but takes more than 5 hours on my machine (just for
c,fortran,c++; objc and java will make that even longer).

Committing the hunks below as obvious in a minute, sorry for the
breakage i've caused.

gcc/ChangeLog
2008-06-21  Bernhard Fischer  <>

	* tree-ssa-pre.c (fini_antic): Bitmap_sets have to be freed before
	the grand_bitmap_obstack.

Index: tree-ssa-pre.c
===================================================================
--- tree-ssa-pre.c	(revision 136998)
+++ tree-ssa-pre.c	(working copy)
@@ -2017,6 +2017,8 @@
 {
   basic_block bb;
 
+  if (maximal_set)
+    bitmap_set_free (maximal_set);
   free (postorder);
   bitmap_obstack_release (&grand_bitmap_obstack);
   free_alloc_pool (bitmap_set_pool);
@@ -2025,8 +2027,6 @@
   free_alloc_pool (unary_node_pool);
   free_alloc_pool (comparison_node_pool);
 
-  if (maximal_set)
-    bitmap_set_free (maximal_set);
   FOR_ALL_BB (bb)
     {
       free (bb->aux);


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