+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.
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.
$(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)
#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"
} \
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));
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. */
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);
+
}
\f
/* Local miscellaneous routines. */
{
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;
{
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;