diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2003-04-05 20:13:20 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2003-04-05 20:13:20 +0000 |
commit | 873ceaab3aeb73c6b9b94d4fc5b7621f99e89349 (patch) | |
tree | 09f44a21eb6409eefdaecf1ec2b9d4c0e6af474c | |
parent | 5be86fec5be89cfd337227746745100491b05d61 (diff) | |
download | gcc-873ceaab3aeb73c6b9b94d4fc5b7621f99e89349.zip gcc-873ceaab3aeb73c6b9b94d4fc5b7621f99e89349.tar.gz gcc-873ceaab3aeb73c6b9b94d4fc5b7621f99e89349.tar.bz2 |
Makefile.in (df.o): Depend on alloc-pool.h, not obstack.h.
2003-04-05 Daniel Berlin <dberlin@dberlin.org>
* Makefile.in (df.o): Depend on alloc-pool.h, not obstack.h.
* df.c: Include alloc-pool.h, not obstack.h.
(df_ref_obstack): Remove.
(df_ref_pool, df_link_pool): Add pools.
(df_alloc): Init the new pools.
(df_free): And free them.
(df_link_create): Use the pools.
(df_ref_create): Ditto.
From-SVN: r65276
-rw-r--r-- | gcc/ChangeLog | 13 | ||||
-rw-r--r-- | gcc/Makefile.in | 2 | ||||
-rw-r--r-- | gcc/df.c | 19 |
3 files changed, 24 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 254e718..f0b12ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2003-04-05 Daniel Berlin <dberlin@dberlin.org> + + * Makefile.in (df.o): Depend on alloc-pool.h, not obstack.h. + * df.c: Include alloc-pool.h, not obstack.h. + (df_ref_obstack): Remove. + (df_ref_pool, df_link_pool): Add pools. + (df_alloc): Init the new pools. + (df_free): And free them. + (df_link_create): Use the pools. + (df_ref_create): Ditto. + 2003-04-05 Kazu Hirata <kazu@cs.umass.edu> * simplify-rtx.c: Fix formatting. @@ -1351,7 +1362,7 @@ Mon Mar 24 20:03:03 CET 2003 Jan Hubicka <jh@suse.cz> operands in case MULT_EXPR of 2003-02-16 patch. 2003-03-20 Daniel Berlin <dberlin@dberlin.org> - Merge changes from new-regalloc-branch + Merge changes from new-regalloc-branch From Michael Matz <matz@suse.de> * df.c (df_ref_record_1): Move init of loc to safe point. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index baac2a0..6e02f20 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1608,7 +1608,7 @@ ssa-ccp.o : ssa-ccp.c $(CONFIG_H) system.h coretypes.h $(TM_H) $(RTL_H) hard-reg $(BASIC_BLOCK_H) ssa.h insn-config.h $(RECOG_H) output.h \ errors.h $(GGC_H) df.h function.h df.o : df.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ - insn-config.h $(RECOG_H) function.h $(REGS_H) $(OBSTACK_H) hard-reg-set.h \ + insn-config.h $(RECOG_H) function.h $(REGS_H) alloc-pool.h hard-reg-set.h \ $(BASIC_BLOCK_H) df.h $(FIBHEAP_H) conflict.o : conflict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(OBSTACK_H) \ $(HASHTAB_H) $(RTL_H) hard-reg-set.h $(BASIC_BLOCK_H) @@ -180,7 +180,7 @@ and again mark them read/write. #include "recog.h" #include "function.h" #include "regs.h" -#include "obstack.h" +#include "alloc-pool.h" #include "hard-reg-set.h" #include "basic-block.h" #include "sbitmap.h" @@ -197,7 +197,8 @@ and again mark them read/write. } \ while (0) -static struct obstack df_ref_obstack; +static alloc_pool df_ref_pool; +static alloc_pool df_link_pool; static struct df *ddf; static void df_reg_table_realloc PARAMS((struct df *, int)); @@ -502,7 +503,9 @@ df_alloc (df, n_regs) int n_insns; basic_block bb; - gcc_obstack_init (&df_ref_obstack); + df_link_pool = create_alloc_pool ("df_link pool", sizeof (struct df_link), + 100); + df_ref_pool = create_alloc_pool ("df_ref pool", sizeof (struct ref), 100); /* Perhaps we should use LUIDs to save memory for the insn_refs table. This is only a small saving; a few pointers. */ @@ -587,7 +590,9 @@ df_free (df) BITMAP_XFREE (df->all_blocks); df->all_blocks = 0; - obstack_free (&df_ref_obstack, NULL); + free_alloc_pool (df_ref_pool); + free_alloc_pool (df_link_pool); + } /* Local miscellaneous routines. */ @@ -629,8 +634,7 @@ df_link_create (ref, next) { struct df_link *link; - link = (struct df_link *) obstack_alloc (&df_ref_obstack, - sizeof (*link)); + link = pool_alloc (df_link_pool); link->next = next; link->ref = ref; return link; @@ -768,8 +772,7 @@ df_ref_create (df, reg, loc, insn, ref_type, ref_flags) { struct ref *this_ref; - this_ref = (struct ref *) obstack_alloc (&df_ref_obstack, - sizeof (*this_ref)); + this_ref = pool_alloc (df_ref_pool); DF_REF_REG (this_ref) = reg; DF_REF_LOC (this_ref) = loc; DF_REF_INSN (this_ref) = insn; |