diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-05 11:12:55 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-05 11:12:55 +0000 |
commit | b6e72c17ee40e50a2696930cda57ad35b9006e92 (patch) | |
tree | 20bd9b979dcfef810710197c02c8e0c921da4f18 /gcc/bitmap.h | |
parent | 6b0ce647e10938ceba871c3ca68ce18bf141ee18 (diff) | |
download | gcc-b6e72c17ee40e50a2696930cda57ad35b9006e92.tar.gz |
* bitmap.h (enum bitmap_bits): Remove.
(bitmap_operation): Remove.
(bitmap_and, bitmap_and_into, bitmap_and_compl,
bitmap_and_compl_into, bitmap_ior, bitmap_ior_into, bitmap_xor,
bitmap_xor_into): Prototype.
* bitmap.c (bitmap_elt_insert_after, bitmap_elt_clear_from): New.
(bitmap_operation): Remove.
(bitmap_and, bitmap_and_into, bitmap_and_compl,
bitmap_and_compl_into, bitmap_ior, bitmap_ior_into, bitmap_xor,
bitmap_xor_into): New.
(bitmap_ior_and_compl, bitmap_ior_and_compl_into): Adjust.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90121 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bitmap.h')
-rw-r--r-- | gcc/bitmap.h | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/gcc/bitmap.h b/gcc/bitmap.h index 5c377cfd187..7bf6efe52c7 100644 --- a/gcc/bitmap.h +++ b/gcc/bitmap.h @@ -66,15 +66,6 @@ typedef struct bitmap_head_def GTY(()) { } bitmap_head; typedef struct bitmap_head_def *bitmap; -/* Enumeration giving the various operations we support. */ -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_IOR_COMPL /* TO = FROM1 | ~FROM2 */ -}; - /* Global data */ extern bitmap_element bitmap_zero_bits; /* Zero bitmap element */ @@ -97,23 +88,23 @@ extern bool bitmap_intersect_compl_p (bitmap, bitmap); /* True if MAP is an empty bitmap. */ #define bitmap_empty_p(MAP) (!(MAP)->first) -/* Perform an operation on two bitmaps, yielding a third. */ -extern int bitmap_operation (bitmap, bitmap, bitmap, enum bitmap_bits); - -#define bitmap_and(DST,A,B) (void)bitmap_operation (DST,A,B,BITMAP_AND) -#define bitmap_and_into(DST_SRC,B) (void)bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_AND) -#define bitmap_and_compl(DST,A,B) (void)bitmap_operation (DST,A,B,BITMAP_AND_COMPL) -#define bitmap_and_compl_into(DST_SRC,B) (void)bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_AND_COMPL) -#define bitmap_ior(DST,A,B) (void)bitmap_operation (DST,A,B,BITMAP_IOR) -#define bitmap_ior_into(DST_SRC,B) (void)bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_IOR) -#define bitmap_ior_compl(DST,A,B) (void)bitmap_operation (DST,A,Br,BITMAP_IOR_COMPL) -#define bitmap_xor(DST,A,B) (void)bitmap_operation (DST,A,B,BITMAP_XOR) -#define bitmap_xor_into(DST_SRC,B) (void)bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_XOR) - -/* `or' into one bitmap the `and' of a second bitmap witih the complement - of a third. Return nonzero if the bitmap changes. */ -extern bool bitmap_ior_and_compl_into (bitmap, bitmap, bitmap); -extern bool bitmap_ior_and_compl (bitmap, bitmap, bitmap, bitmap); +/* Boolean operations on bitmaps. The _into variants are two operand + versions that modify the first source operand. The other variants + are three operand versions that to not destroy the source bitmaps. + The operations supported are &, & ~, |, ^. */ +extern void bitmap_and (bitmap, bitmap, bitmap); +extern void bitmap_and_into (bitmap, bitmap); +extern void bitmap_and_compl (bitmap, bitmap, bitmap); +extern void bitmap_and_compl_into (bitmap, bitmap); +extern bool bitmap_ior (bitmap, bitmap, bitmap); +extern bool bitmap_ior_into (bitmap, bitmap); +extern void bitmap_xor (bitmap, bitmap, bitmap); +extern void bitmap_xor_into (bitmap, bitmap); + +/* DST = A | (B & ~C). Return true if DST changes. */ +extern bool bitmap_ior_and_compl (bitmap DST, bitmap A, bitmap B, bitmap C); +/* A |= (B & ~C). Return true if A changes. */ +extern bool bitmap_ior_and_compl_into (bitmap DST, bitmap B, bitmap C); /* Clear a single register in a register set. */ extern void bitmap_clear_bit (bitmap, int); |