Commit 9f8e7478 by Nathan Sidwell

bitmap.c (bitmap_malloc_alloc, [...]): Remove.

	* bitmap.c (bitmap_malloc_alloc, bitmap_malloc_free): Remove.
	* bitmap.h (bitmap_malloc_alloc, bitmap_malloc_free): Remove.
	(BITMAP_XMALLOC): Forward to BITMAP_OBSTACK_ALLOC.
	(BITMAP_XFREE): Forward to BITMAP_OBSTACK_FREE.

From-SVN: r91306
parent e288e2f5
2004-11-25 Nathan Sidwell <nathan@codesourcery.com>
* bitmap.c (bitmap_malloc_alloc, bitmap_malloc_free): Remove.
* bitmap.h (bitmap_malloc_alloc, bitmap_malloc_free): Remove.
(BITMAP_XMALLOC): Forward to BITMAP_OBSTACK_ALLOC.
(BITMAP_XFREE): Forward to BITMAP_OBSTACK_FREE.
2004-11-25 Andrew MacLeod <amacleod@redhat.com> 2004-11-25 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/18587 PR tree-optimization/18587
...@@ -5,27 +12,28 @@ ...@@ -5,27 +12,28 @@
call clobbered caches as invalid. call clobbered caches as invalid.
* tree-ssa-operands.c (ssa_call_clobbered_cache_valid): New. Flag * tree-ssa-operands.c (ssa_call_clobbered_cache_valid): New. Flag
indicating whether the call clobbered operand cache is valid. indicating whether the call clobbered operand cache is valid.
(ssa_ro_call_cache_valid): New. Flag indicating whether the pure/const (ssa_ro_call_cache_valid): New. Flag indicating whether the
call operand cache is valid. pure/const call operand cache is valid.
(clobbered_v_may_defs, clobbered_vuses, ro_call_vuses): New. Cached (clobbered_v_may_defs, clobbered_vuses, ro_call_vuses): New. Cached
list of operands for cached call virtual operands. list of operands for cached call virtual operands.
(clobbered_aliased_loads, clobbered_aliased_stores, (clobbered_aliased_loads, clobbered_aliased_stores,
ro_call_aliased_load): New. flags caching whether alias bits are to be ro_call_aliased_load): New. flags caching whether alias bits are
set in call stmt's. to be set in call stmt's.
(fini_ssa_operands): Remove call operand caches if present. (fini_ssa_operands): Remove call operand caches if present.
(get_expr_operands, get_asm_expr_operands, get_indirect_ref_operands): (get_expr_operands, get_asm_expr_operands,
Pass stmt annotation to add_stmt_operand. get_indirect_ref_operands): Pass stmt annotation to add_stmt_operand.
(get_call_expr_operands): Add call clobbered variables first. (get_call_expr_operands): Add call clobbered variables first.
(add_stmt_operand): Take stmt annotation rather than stmt as a param. (add_stmt_operand): Take stmt annotation rather than stmt as a param.
(add_call_clobber_ops, add_call_read_ops): Use the call operand cache (add_call_clobber_ops, add_call_read_ops): Use the call operand cache
if it is valid, otherise fill the cache. if it is valid, otherise fill the cache.
* tree-ssa-operands.h (ssa_clobbered_cache_valid): Declare extern. * tree-ssa-operands.h (ssa_clobbered_cache_valid): Declare extern.
* tree-flow.h (struct var_ann_d): Add in_vuse_list and in_v_may_def_list * tree-flow.h (struct var_ann_d): Add in_vuse_list and
bits. in_v_may_def_list bits.
* tree-ssa-operands.c (cleanup_v_may_defs): New. Clear the in_list bits * tree-ssa-operands.c (cleanup_v_may_defs): New. Clear the
for the v_may_def elements and empty the operand build array. in_list bits for the v_may_def elements and empty the operand
(finalize_ssa_vuses): Use cleanup_v_may_defs and remove redundant VUSES build array
by checking the in_v_may_def_list bit. (finalize_ssa_vuses): Use cleanup_v_may_defs and remove redundant
VUSES by checking the in_v_may_def_list bit.
(append_v_may_def, append_vuse): Use the in_list bit rather than (append_v_may_def, append_vuse): Use the in_list bit rather than
scanning the array for duplicates. scanning the array for duplicates.
......
...@@ -222,20 +222,6 @@ bitmap_gc_alloc (void) ...@@ -222,20 +222,6 @@ bitmap_gc_alloc (void)
return map; return map;
} }
/* Create a new malloced bitmap. Elements will be allocated from the
default bitmap obstack. */
bitmap
bitmap_malloc_alloc (void)
{
bitmap map;
map = xmalloc (sizeof (bitmap_head));
bitmap_initialize (map, &bitmap_default_obstack);
return map;
}
/* Release an obstack allocated bitmap. */ /* Release an obstack allocated bitmap. */
void void
...@@ -249,15 +235,6 @@ bitmap_obstack_free (bitmap map) ...@@ -249,15 +235,6 @@ bitmap_obstack_free (bitmap map)
} }
} }
/* Release a malloc allocated bitmap. */
void
bitmap_malloc_free (bitmap map)
{
bitmap_clear (map);
free (map);
}
/* Return nonzero if all bits in an element are zero. */ /* Return nonzero if all bits in an element are zero. */
......
...@@ -145,10 +145,8 @@ bitmap_initialize (bitmap head, bitmap_obstack *obstack) ...@@ -145,10 +145,8 @@ bitmap_initialize (bitmap head, bitmap_obstack *obstack)
/* Allocate and free bitmaps from obstack, malloc and gc'd memory. */ /* Allocate and free bitmaps from obstack, malloc and gc'd memory. */
extern bitmap bitmap_obstack_alloc (bitmap_obstack *obstack); extern bitmap bitmap_obstack_alloc (bitmap_obstack *obstack);
extern bitmap bitmap_malloc_alloc (void);
extern bitmap bitmap_gc_alloc (void); extern bitmap bitmap_gc_alloc (void);
extern void bitmap_obstack_free (bitmap); extern void bitmap_obstack_free (bitmap);
extern void bitmap_malloc_free (bitmap);
/* A few compatibility/functions macros for compatibility with sbitmaps */ /* A few compatibility/functions macros for compatibility with sbitmaps */
#define dump_bitmap(file, bitmap) bitmap_print (file, bitmap, "", "\n") #define dump_bitmap(file, bitmap) bitmap_print (file, bitmap, "", "\n")
...@@ -162,21 +160,14 @@ extern unsigned bitmap_first_set_bit (bitmap); ...@@ -162,21 +160,14 @@ extern unsigned bitmap_first_set_bit (bitmap);
#define BITMAP_GGC_ALLOC() bitmap_gc_alloc () #define BITMAP_GGC_ALLOC() bitmap_gc_alloc ()
/* Allocate a bitmap with xmalloc. */ /* Allocate a bitmap with xmalloc. */
#define BITMAP_XMALLOC() bitmap_malloc_alloc () #define BITMAP_XMALLOC() BITMAP_OBSTACK_ALLOC (NULL)
/* Do any cleanup needed on a bitmap when it is no longer used. */ /* Do any cleanup needed on a bitmap when it is no longer used. */
#define BITMAP_FREE(BITMAP) \ #define BITMAP_FREE(BITMAP) \
((void)(bitmap_obstack_free (BITMAP), (BITMAP) = NULL)) ((void)(bitmap_obstack_free (BITMAP), (BITMAP) = NULL))
/* Do any cleanup needed on an xmalloced bitmap when it is no longer used. */ /* Do any cleanup needed on an xmalloced bitmap when it is no longer used. */
#define BITMAP_XFREE(BITMAP) \ #define BITMAP_XFREE(BITMAP) BITMAP_OBSTACK_FREE (BITMAP)
do { \
if (BITMAP) \
{ \
bitmap_malloc_free (BITMAP); \
(BITMAP) = 0; \
} \
} while (0)
/* Iterator for bitmaps. */ /* Iterator for bitmaps. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment