mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-03 16:54:27 +08:00
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
This commit is contained in:
parent
5be86fec5b
commit
873ceaab3a
@ -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.
|
||||
|
@ -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)
|
||||
|
19
gcc/df.c
19
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;
|
||||
|
Loading…
Reference in New Issue
Block a user