aboutsummaryrefslogtreecommitdiff
path: root/gcc/df.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2003-04-05 20:13:20 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2003-04-05 20:13:20 +0000
commit873ceaab3aeb73c6b9b94d4fc5b7621f99e89349 (patch)
tree09f44a21eb6409eefdaecf1ec2b9d4c0e6af474c /gcc/df.c
parent5be86fec5be89cfd337227746745100491b05d61 (diff)
downloadgcc-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
Diffstat (limited to 'gcc/df.c')
-rw-r--r--gcc/df.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/df.c b/gcc/df.c
index 7410290..b23c286 100644
--- a/gcc/df.c
+++ b/gcc/df.c
@@ -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;