Commit 3fe793df by Trevor Saunders Committed by Trevor Saunders

simplify the bitmap alloc_stat functions with c++

gcc/fortran/ChangeLog:

2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* resolve.c (find_reachable_labels): Adjust.

gcc/ChangeLog:

2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
	(bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
	* bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
	(bitmap_gc_alloc_stat): Likewise.
	(BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.

From-SVN: r250709
parent 22a7303d
2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> 2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
(bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
* bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
(bitmap_gc_alloc_stat): Likewise.
(BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* rtl.c (shallow_copy_rtx_stat): Remove _stat from name. * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
* rtl.h (shallow_copy_rtx): Remove macro. * rtl.h (shallow_copy_rtx): Remove macro.
......
...@@ -273,7 +273,7 @@ bitmap_obstack_release (bitmap_obstack *bit_obstack) ...@@ -273,7 +273,7 @@ bitmap_obstack_release (bitmap_obstack *bit_obstack)
it on the default bitmap obstack. */ it on the default bitmap obstack. */
bitmap bitmap
bitmap_obstack_alloc_stat (bitmap_obstack *bit_obstack MEM_STAT_DECL) bitmap_alloc (bitmap_obstack *bit_obstack MEM_STAT_DECL)
{ {
bitmap map; bitmap map;
...@@ -295,7 +295,7 @@ bitmap_obstack_alloc_stat (bitmap_obstack *bit_obstack MEM_STAT_DECL) ...@@ -295,7 +295,7 @@ bitmap_obstack_alloc_stat (bitmap_obstack *bit_obstack MEM_STAT_DECL)
/* Create a new GCd bitmap. */ /* Create a new GCd bitmap. */
bitmap bitmap
bitmap_gc_alloc_stat (ALONE_MEM_STAT_DECL) bitmap_gc_alloc (ALONE_MEM_STAT_DECL)
{ {
bitmap map; bitmap map;
......
...@@ -345,10 +345,10 @@ bitmap_initialize_stat (bitmap head, bitmap_obstack *obstack MEM_STAT_DECL) ...@@ -345,10 +345,10 @@ bitmap_initialize_stat (bitmap head, bitmap_obstack *obstack MEM_STAT_DECL)
#define bitmap_initialize(h,o) bitmap_initialize_stat (h,o MEM_STAT_INFO) #define bitmap_initialize(h,o) bitmap_initialize_stat (h,o MEM_STAT_INFO)
/* 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_stat (bitmap_obstack *obstack MEM_STAT_DECL); extern bitmap bitmap_alloc (bitmap_obstack *obstack CXX_MEM_STAT_INFO);
#define bitmap_obstack_alloc(t) bitmap_obstack_alloc_stat (t MEM_STAT_INFO) #define BITMAP_ALLOC bitmap_alloc
extern bitmap bitmap_gc_alloc_stat (ALONE_MEM_STAT_DECL); extern bitmap bitmap_gc_alloc (ALONE_CXX_MEM_STAT_INFO);
#define bitmap_gc_alloc() bitmap_gc_alloc_stat (ALONE_MEM_STAT_INFO) #define BITMAP_GGC_ALLOC bitmap_gc_alloc
extern void bitmap_obstack_free (bitmap); extern void bitmap_obstack_free (bitmap);
/* A few compatibility/functions macros for compatibility with sbitmaps */ /* A few compatibility/functions macros for compatibility with sbitmaps */
...@@ -365,12 +365,6 @@ extern unsigned bitmap_last_set_bit (const_bitmap); ...@@ -365,12 +365,6 @@ extern unsigned bitmap_last_set_bit (const_bitmap);
/* Compute bitmap hash (for purposes of hashing etc.) */ /* Compute bitmap hash (for purposes of hashing etc.) */
extern hashval_t bitmap_hash (const_bitmap); extern hashval_t bitmap_hash (const_bitmap);
/* Allocate a bitmap from a bit obstack. */
#define BITMAP_ALLOC(OBSTACK) bitmap_obstack_alloc (OBSTACK)
/* Allocate a gc'd bitmap. */
#define BITMAP_GGC_ALLOC() bitmap_gc_alloc ()
/* 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), (BITMAP) = (bitmap) NULL)) ((void) (bitmap_obstack_free ((bitmap) BITMAP), (BITMAP) = (bitmap) NULL))
......
2017-07-28 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* resolve.c (find_reachable_labels): Adjust.
2017-07-25 Jakub Jelinek <jakub@redhat.com> 2017-07-25 Jakub Jelinek <jakub@redhat.com>
* ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask. * ioparm.def: Use 1U << 31 instead of 1 << 31 as flags2 mask.
......
...@@ -9098,7 +9098,7 @@ find_reachable_labels (gfc_code *block) ...@@ -9098,7 +9098,7 @@ find_reachable_labels (gfc_code *block)
if (!block) if (!block)
return; return;
cs_base->reachable_labels = bitmap_obstack_alloc (&labels_obstack); cs_base->reachable_labels = bitmap_alloc (&labels_obstack);
/* Collect labels in this block. We don't keep those corresponding /* Collect labels in this block. We don't keep those corresponding
to END {IF|SELECT}, these are checked in resolve_branch by going to END {IF|SELECT}, these are checked in resolve_branch by going
......
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