aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.h
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2021-09-13 19:49:49 +0200
committerThomas Koenig <tkoenig@gcc.gnu.org>2021-09-13 19:49:49 +0200
commitb18a97e5dd0935e1c4a626c230f21457d0aad3d5 (patch)
treec1818f41af6fe780deafb6cd6a183f32085fe654 /gcc/bitmap.h
parente76a53644c9d70e998c0d050e9a456af388c6b61 (diff)
downloadgcc-b18a97e5dd0935e1c4a626c230f21457d0aad3d5.zip
gcc-b18a97e5dd0935e1c4a626c230f21457d0aad3d5.tar.gz
gcc-b18a97e5dd0935e1c4a626c230f21457d0aad3d5.tar.bz2
Merged current trunk to branch.
Diffstat (limited to 'gcc/bitmap.h')
-rw-r--r--gcc/bitmap.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index b481f4b..0846f79 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -1,5 +1,5 @@
/* Functions to support general ended bitmaps.
- Copyright (C) 1997-2020 Free Software Foundation, Inc.
+ Copyright (C) 1997-2021 Free Software Foundation, Inc.
This file is part of GCC.
@@ -438,6 +438,13 @@ extern bool bitmap_set_bit (bitmap, int);
/* Return true if a bit is set in a bitmap. */
extern int bitmap_bit_p (const_bitmap, int);
+/* Set and get multiple bit values in a sparse bitmap. This allows a bitmap to
+ function as a sparse array of bit patterns where the patterns are
+ multiples of power of 2. This is more efficient than performing this as
+ multiple individual operations. */
+void bitmap_set_aligned_chunk (bitmap, unsigned int, unsigned int, BITMAP_WORD);
+BITMAP_WORD bitmap_get_aligned_chunk (const_bitmap, unsigned int, unsigned int);
+
/* Debug functions to print a bitmap. */
extern void debug_bitmap (const_bitmap);
extern void debug_bitmap_file (FILE *, const_bitmap);
@@ -939,8 +946,10 @@ bmp_iter_and_compl (bitmap_iterator *bi, unsigned *bit_no)
class auto_bitmap
{
public:
- auto_bitmap () { bitmap_initialize (&m_bits, &bitmap_default_obstack); }
- explicit auto_bitmap (bitmap_obstack *o) { bitmap_initialize (&m_bits, o); }
+ auto_bitmap (ALONE_CXX_MEM_STAT_INFO)
+ { bitmap_initialize (&m_bits, &bitmap_default_obstack PASS_MEM_STAT); }
+ explicit auto_bitmap (bitmap_obstack *o CXX_MEM_STAT_INFO)
+ { bitmap_initialize (&m_bits, o PASS_MEM_STAT); }
~auto_bitmap () { bitmap_clear (&m_bits); }
// Allow calling bitmap functions on our bitmap.
operator bitmap () { return &m_bits; }
@@ -949,10 +958,8 @@ class auto_bitmap
// Prevent making a copy that references our bitmap.
auto_bitmap (const auto_bitmap &);
auto_bitmap &operator = (const auto_bitmap &);
-#if __cplusplus >= 201103L
auto_bitmap (auto_bitmap &&);
auto_bitmap &operator = (auto_bitmap &&);
-#endif
bitmap_head m_bits;
};