[patch] cfg.c: Remove flow_obstack.

Kazu Hirata kazu@cs.umass.edu
Mon Nov 29 15:29:00 GMT 2004


Hi,

Attached is a patch to remove flow_obstack as nobody except init_flow
uses it.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2004-11-29  Kazu Hirata  <kazu@cs.umass.edu>

	* cfg.c (flow_obstack): Remove.
	(flow_firstobj): Likewise.
	(init_flow): Remove all uses of flow_obstack.

Index: cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfg.c,v
retrieving revision 1.78
diff -u -d -p -r1.78 cfg.c
--- cfg.c	22 Nov 2004 22:04:21 -0000	1.78
+++ cfg.c	28 Nov 2004 05:11:30 -0000
@@ -66,8 +66,6 @@ Software Foundation, 59 Temple Place - S
 /* The obstack on which the flow graph components are allocated.  */
 
 struct bitmap_obstack reg_obstack;
-struct obstack flow_obstack;
-static char *flow_firstobj;
 
 /* Number of basic blocks in the current function.  */
 
@@ -102,22 +100,8 @@ enum profile_status profile_status;
 void
 init_flow (void)
 {
-  static int initialized;
-
   n_edges = 0;
 
-  if (!initialized)
-    {
-      gcc_obstack_init (&flow_obstack);
-      flow_firstobj = obstack_alloc (&flow_obstack, 0);
-      initialized = 1;
-    }
-  else
-    {
-      obstack_free (&flow_obstack, flow_firstobj);
-      flow_firstobj = obstack_alloc (&flow_obstack, 0);
-    }
-
   ENTRY_BLOCK_PTR = ggc_alloc_cleared (sizeof (*ENTRY_BLOCK_PTR));
   ENTRY_BLOCK_PTR->index = ENTRY_BLOCK;
   EXIT_BLOCK_PTR = ggc_alloc_cleared (sizeof (*EXIT_BLOCK_PTR));



More information about the Gcc-patches mailing list