diff options
author | Daniel Berlin <dan@cgsoftware.com> | 2001-07-29 18:21:08 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2001-07-29 18:21:08 +0000 |
commit | b2d5779326ed5cc88bdfd92051d7a0bc077b08ef (patch) | |
tree | 338c1dfc401b2ef68f7aac1d0b6b6ba145663419 /gcc/sbitmap.c | |
parent | 6d18adbc2c00b2919cbf6b59219a2287e6feecd7 (diff) | |
download | gcc-b2d5779326ed5cc88bdfd92051d7a0bc077b08ef.zip gcc-b2d5779326ed5cc88bdfd92051d7a0bc077b08ef.tar.gz gcc-b2d5779326ed5cc88bdfd92051d7a0bc077b08ef.tar.bz2 |
[multiple changes]
2001-07-27 Daniel Berlin <dan@cgsoftware.com>
* regclass.c (reg_scan_mark_refs): Increment REG_N_REFS when we
increment REG_N_SETS.
2001-07-26 Daniel Berlin <dan@cgsoftware.com>
* sbitmap.h: New prototype for sbitmap_a_xor_b.
* sbitmap.c (sbitmap_a_xor_b): New function.
#ifdef the basic block stuff on the define IN_GCC.
From-SVN: r44460
Diffstat (limited to 'gcc/sbitmap.c')
-rw-r--r-- | gcc/sbitmap.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/sbitmap.c b/gcc/sbitmap.c index eb1bf5a..5490a63 100644 --- a/gcc/sbitmap.c +++ b/gcc/sbitmap.c @@ -99,6 +99,13 @@ sbitmap_copy (dst, src) memcpy (dst->elms, src->elms, sizeof (SBITMAP_ELT_TYPE) * dst->size); } +/* Determine if a == b. */ +int +sbitmap_equal (a, b) + sbitmap a, b; +{ + return !memcmp (a->elms, b->elms, sizeof (SBITMAP_ELT_TYPE) * a->size); +} /* Zero all elements in a bitmap. */ void @@ -230,6 +237,31 @@ sbitmap_a_and_b (dst, a, b) return changed; } +/* Set DST to be (A xor B)). + Return non-zero if any change is made. */ + +int +sbitmap_a_xor_b (dst, a, b) + sbitmap dst, a, b; +{ + unsigned int i; + sbitmap_ptr dstp, ap, bp; + int changed = 0; + + for (dstp = dst->elms, ap = a->elms, bp = b->elms, i = 0; i < dst->size; + i++, dstp++) + { + SBITMAP_ELT_TYPE tmp = *ap++ ^ *bp++; + + if (*dstp != tmp) + { + changed = 1; + *dstp = tmp; + } + } + return changed; +} + /* Set DST to be (A or B)). Return non-zero if any change is made. */ @@ -324,6 +356,7 @@ sbitmap_a_and_b_or_c (dst, a, b, c) return changed; } +#ifdef IN_GCC /* Set the bitmap DST to the intersection of SRC of successors of block number BB, using the new flow graph structures. */ @@ -483,6 +516,7 @@ sbitmap_union_of_preds (dst, src, bb) *r++ |= *p++; } } +#endif /* Return number of first bit set in the bitmap, -1 if none. */ |