aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-11-02 10:00:09 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-11-02 10:00:09 +0000
commit7ef7b3459927ad613838df2353515d04539cd1d6 (patch)
tree200acd184e06dc1da5eab8d2d822871df1c7ea0b /gcc/bitmap.c
parent55994078b6bc51ae62bd4117c6c335b94336137b (diff)
downloadgcc-7ef7b3459927ad613838df2353515d04539cd1d6.zip
gcc-7ef7b3459927ad613838df2353515d04539cd1d6.tar.gz
gcc-7ef7b3459927ad613838df2353515d04539cd1d6.tar.bz2
bitmap.h (bitmap_and, [...]): Produce void.
* bitmap.h (bitmap_and, bitmap_and_into, bitmap_and_compl, bitmap_and_compl_into, bitmap_ior, bitmap_iot_into, bitmap_ior_compl, bitmap_xor, bitmap_xor_into): Produce void. (bitmap_ior_and_compl_into): Produce bool. (bitmap_union_of_diff): Rename to ... (bitmap_ior_and_compl): ... here. Produce bool. * bitmap.c (bitmap_ior_and_compl_into): Return bool. Use bitmap_operation directly. (bitmap_union_of_diff): Rename to ... (bitmap_ior_and_compl): ... here. Return bool, use bitmap_operation directly. * df.c (df_rd_transfer_function): Use bitmap_ior_and_compl. (df_ru_transfer_function, df_lr_transfer_function): Likewise. * global.c (modify_bb_reg_pav): Likewise. From-SVN: r89982
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r--gcc/bitmap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index c78912b..57939ff 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -743,10 +743,9 @@ bitmap_intersect_compl_p (bitmap a, bitmap b)
}
-/* Or into bitmap TO bitmap FROM1 and'ed with the complement of
- bitmap FROM2. */
+/* Produce TO |= FROM1 & ~FROM2. Return true, if TO changed. */
-int
+bool
bitmap_ior_and_compl_into (bitmap to, bitmap from1, bitmap from2)
{
bitmap_head tmp;
@@ -756,13 +755,15 @@ bitmap_ior_and_compl_into (bitmap to, bitmap from1, bitmap from2)
tmp.using_obstack = 0;
bitmap_and_compl (&tmp, from1, from2);
- changed = bitmap_ior_into (to, &tmp);
+ changed = bitmap_operation (to, to, &tmp, BITMAP_IOR);
bitmap_clear (&tmp);
return changed;
}
-int
-bitmap_union_of_diff (bitmap dst, bitmap a, bitmap b, bitmap c)
+/* Produce DST = A | (B & ~C). Return true if DST != A. */
+
+bool
+bitmap_ior_and_compl (bitmap dst, bitmap a, bitmap b, bitmap c)
{
bitmap_head tmp;
int changed;
@@ -771,7 +772,7 @@ bitmap_union_of_diff (bitmap dst, bitmap a, bitmap b, bitmap c)
tmp.using_obstack = 0;
bitmap_and_compl (&tmp, b, c);
- changed = bitmap_ior (dst, &tmp, a);
+ changed = bitmap_operation (dst, a, &tmp, BITMAP_IOR);
bitmap_clear (&tmp);
return changed;