basic-block.h (OBSTACK_ALLOC_REG_SET): Adjust.
* basic-block.h (OBSTACK_ALLOC_REG_SET): Adjust. (FREE_REG_SET): Adjust. * bitmap.c (bitmap_obstack_free): Cope with NULL bitmap. * bitmap.h (BITMAP_OBSTACK_ALLOC): Rename to ... (BITMAP_ALLOC): ... here. (BITMAP_OBSTACK_FREE): Rename to ... (BITMAP_FREE): Don't check for NULL bitmap here. * tree-ssa-pre.c (value_insert_into_set_bitmap, bitmap_set_new): Use new names. From-SVN: r91281
This commit is contained in:
parent
d0397fd970
commit
cc175e7c89
5 changed files with 24 additions and 17 deletions
|
@ -1,5 +1,15 @@
|
|||
2004-11-25 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* basic-block.h (OBSTACK_ALLOC_REG_SET): Adjust.
|
||||
(FREE_REG_SET): Adjust.
|
||||
* bitmap.c (bitmap_obstack_free): Cope with NULL bitmap.
|
||||
* bitmap.h (BITMAP_OBSTACK_ALLOC): Rename to ...
|
||||
(BITMAP_ALLOC): ... here.
|
||||
(BITMAP_OBSTACK_FREE): Rename to ...
|
||||
(BITMAP_FREE): Don't check for NULL bitmap here.
|
||||
* tree-ssa-pre.c (value_insert_into_set_bitmap,
|
||||
bitmap_set_new): Use new names.
|
||||
|
||||
* bt-load.c (migrate_btr_defs): Remove unneeded NULL check.
|
||||
* df.c (df_free): Likewise.
|
||||
* ra-build.c (ra_build_free, ra_build_free_all): Likewise.
|
||||
|
|
|
@ -38,10 +38,10 @@ typedef bitmap_head regset_head;
|
|||
typedef bitmap regset;
|
||||
|
||||
/* Allocate a register set with oballoc. */
|
||||
#define ALLOC_REG_SET(OBSTACK) BITMAP_OBSTACK_ALLOC (OBSTACK)
|
||||
#define ALLOC_REG_SET(OBSTACK) BITMAP_ALLOC (OBSTACK)
|
||||
|
||||
/* Do any cleanup needed on a regset when it is no longer used. */
|
||||
#define FREE_REG_SET(REGSET) BITMAP_OBSTACK_FREE (REGSET)
|
||||
#define FREE_REG_SET(REGSET) BITMAP_FREE (REGSET)
|
||||
|
||||
/* Initialize a new regset. */
|
||||
#define INIT_REG_SET(HEAD) bitmap_initialize (HEAD, ®_obstack)
|
||||
|
|
|
@ -241,9 +241,12 @@ bitmap_malloc_alloc (void)
|
|||
void
|
||||
bitmap_obstack_free (bitmap map)
|
||||
{
|
||||
bitmap_clear (map);
|
||||
map->first = (void *)map->obstack->heads;
|
||||
map->obstack->heads = map;
|
||||
if (map)
|
||||
{
|
||||
bitmap_clear (map);
|
||||
map->first = (void *)map->obstack->heads;
|
||||
map->obstack->heads = map;
|
||||
}
|
||||
}
|
||||
|
||||
/* Release a malloc allocated bitmap. */
|
||||
|
|
12
gcc/bitmap.h
12
gcc/bitmap.h
|
@ -156,7 +156,7 @@ extern void bitmap_malloc_free (bitmap);
|
|||
extern unsigned bitmap_first_set_bit (bitmap);
|
||||
|
||||
/* Allocate a bitmap from a bit obstack. */
|
||||
#define BITMAP_OBSTACK_ALLOC(OBSTACK) bitmap_obstack_alloc (OBSTACK)
|
||||
#define BITMAP_ALLOC(OBSTACK) bitmap_obstack_alloc (OBSTACK)
|
||||
|
||||
/* Allocate a gc'd bitmap. */
|
||||
#define BITMAP_GGC_ALLOC() bitmap_gc_alloc ()
|
||||
|
@ -165,14 +165,8 @@ extern unsigned bitmap_first_set_bit (bitmap);
|
|||
#define BITMAP_XMALLOC() bitmap_malloc_alloc ()
|
||||
|
||||
/* Do any cleanup needed on a bitmap when it is no longer used. */
|
||||
#define BITMAP_OBSTACK_FREE(BITMAP) \
|
||||
do { \
|
||||
if (BITMAP) \
|
||||
{ \
|
||||
bitmap_obstack_free (BITMAP); \
|
||||
(BITMAP) = 0; \
|
||||
} \
|
||||
} while (0)
|
||||
#define BITMAP_FREE(BITMAP) \
|
||||
((void)(bitmap_obstack_free (BITMAP), (BITMAP) = NULL))
|
||||
|
||||
/* Do any cleanup needed on an xmalloced bitmap when it is no longer used. */
|
||||
#define BITMAP_XFREE(BITMAP) \
|
||||
|
|
|
@ -462,7 +462,7 @@ value_insert_into_set_bitmap (value_set_t set, tree v)
|
|||
gcc_assert (set->indexed);
|
||||
|
||||
if (set->values == NULL)
|
||||
set->values = BITMAP_OBSTACK_ALLOC (&grand_bitmap_obstack);
|
||||
set->values = BITMAP_ALLOC (&grand_bitmap_obstack);
|
||||
|
||||
bitmap_set_bit (set->values, VALUE_HANDLE_ID (v));
|
||||
}
|
||||
|
@ -474,8 +474,8 @@ static bitmap_set_t
|
|||
bitmap_set_new (void)
|
||||
{
|
||||
bitmap_set_t ret = pool_alloc (bitmap_set_pool);
|
||||
ret->expressions = BITMAP_OBSTACK_ALLOC (&grand_bitmap_obstack);
|
||||
ret->values = BITMAP_OBSTACK_ALLOC (&grand_bitmap_obstack);
|
||||
ret->expressions = BITMAP_ALLOC (&grand_bitmap_obstack);
|
||||
ret->values = BITMAP_ALLOC (&grand_bitmap_obstack);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue