summaryrefslogtreecommitdiff
path: root/gcc/bitmap.h
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-16 16:13:25 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-16 16:13:25 +0000
commit973b44934cfc63bb81d7b22f4a46df1cde3db162 (patch)
tree3a45f5c5fd147ad1c6593514ed6b6fb51ad056d2 /gcc/bitmap.h
parentdaf50c084cec2b5975efffb61c480ad21d923532 (diff)
downloadgcc-973b44934cfc63bb81d7b22f4a46df1cde3db162.tar.gz
2001-06-16 Daniel Berlin <dan@cgsoftware.com>
* bitmap.h: Add dump_bitmap, bitmap_zero, bitmap_union_of_diffs, bitmap_a_or_b, bitmap_a_and_b, bitmap_first_set_bit, bitmap_last_set_bit. All for compatibility with sbitmap's. *bitmap.c (bitmap_zero): New function. (bitmap_union_of_diffs): New function. (bitmap_first_set_bit): New function. (bitmap_last_set_bit): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43420 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bitmap.h')
-rw-r--r--gcc/bitmap.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 0eb59927073..95c2a5e8f0d 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -52,6 +52,7 @@ typedef struct bitmap_head_def {
bitmap_element *first; /* First element in linked list. */
bitmap_element *current; /* Last element looked at. */
unsigned int indx; /* Index of last element looked at. */
+
} bitmap_head, *bitmap;
/* Enumeration giving the various operations we support. */
@@ -59,7 +60,8 @@ enum bitmap_bits {
BITMAP_AND, /* TO = FROM1 & FROM2 */
BITMAP_AND_COMPL, /* TO = FROM1 & ~ FROM2 */
BITMAP_IOR, /* TO = FROM1 | FROM2 */
- BITMAP_XOR /* TO = FROM1 ^ FROM2 */
+ BITMAP_XOR, /* TO = FROM1 ^ FROM2 */
+ BITMAP_IOR_COMPL /* TO = FROM1 | ~FROM2 */
};
/* Global data */
@@ -104,6 +106,15 @@ extern bitmap bitmap_initialize PARAMS ((bitmap));
/* Release all memory held by bitmaps. */
extern void bitmap_release_memory PARAMS ((void));
+/* A few compatibility/functions macros for compatibility with sbitmaps */
+#define dump_bitmap(file, bitmap) bitmap_print (file, bitmap, "", "\n")
+#define bitmap_zero(a) bitmap_clear (a)
+#define bitmap_a_or_b(a,b,c) bitmap_operation (a, b, c, BITMAP_IOR)
+#define bitmap_a_and_b(a,b,c) bitmap_operation (a, b, c, BITMAP_AND)
+extern int bitmap_union_of_diff PARAMS((bitmap, bitmap, bitmap, bitmap));
+extern int bitmap_first_set_bit PARAMS((bitmap));
+extern int bitmap_last_set_bit PARAMS((bitmap));
+
/* Allocate a bitmap with oballoc. */
#define BITMAP_OBSTACK_ALLOC(OBSTACK) \
bitmap_initialize ((bitmap) obstack_alloc (OBSTACK, sizeof (bitmap_head)))