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]

[tree-ssa][PATCH]: Make dom_children survive collection


Zdenek noticed this one, but i can't find his original patch, so i did one.

This is necessary for a patch containing a set of speed ups and memory reduction i'll be posting for SSAPRE soon.

I'm committing it as obvious, since it's 3 lines, obviously correct, and does fix a few cases (none easily testcasible due to collection requirements) where PRE had to redo dominators and they then got collected.

--Dan

2003-10-22 Daniel Berlin <dberlin@dberlin.org>

	* tree-flow-inline.h (add_dom_child): XMALLOC, not GGC_ALLOC,
	the bitmap.
	(clear_dom_children): XFREE the bitmap.

Index: tree-flow-inline.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-flow-inline.h,v
retrieving revision 1.1.2.54
diff -u -3 -p -r1.1.2.54 tree-flow-inline.h
--- tree-flow-inline.h	13 Oct 2003 15:35:57 -0000	1.1.2.54
+++ tree-flow-inline.h	22 Oct 2003 21:49:46 -0000
@@ -327,7 +327,7 @@ add_dom_child (basic_block bb, basic_blo
 {
   bb_ann_t ann = bb_ann (bb);
   if (ann->dom_children == NULL)
-    ann->dom_children = BITMAP_GGC_ALLOC ();
+    ann->dom_children = BITMAP_XMALLOC ();
   bitmap_set_bit (ann->dom_children, child_bb->index);
 }

@@ -347,6 +347,8 @@ remove_dom_child (basic_block bb, basic_
 static inline void
 clear_dom_children (basic_block bb)
 {
+  if (bb_ann (bb)->dom_children)
+    BITMAP_XFREE (bb_ann (bb)->dom_children);
   bb_ann (bb)->dom_children = NULL;
 }



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