diff options
author | Lawrence Crowl <crowl@google.com> | 2012-11-01 19:23:35 +0000 |
---|---|---|
committer | Lawrence Crowl <crowl@gcc.gnu.org> | 2012-11-01 19:23:35 +0000 |
commit | d7c028c07b1998cc80f67e053c8131cf8b387af7 (patch) | |
tree | 5ec5bcd56906f1ff213b4652971a165736d6fda7 /gcc/ebitmap.c | |
parent | 6cd1dd26753a93d9916335a6f698857915d273c2 (diff) | |
download | gcc-d7c028c07b1998cc80f67e053c8131cf8b387af7.zip gcc-d7c028c07b1998cc80f67e053c8131cf8b387af7.tar.gz gcc-d7c028c07b1998cc80f67e053c8131cf8b387af7.tar.bz2 |
This patch normalizes more bitmap function names.
sbitmap.h
TEST_BIT -> bitmap_bit_p
SET_BIT -> bitmap_set_bit
SET_BIT_WITH_POPCOUNT -> bitmap_set_bit_with_popcount
RESET_BIT -> bitmap_clear_bit
RESET_BIT_WITH_POPCOUNT -> bitmap_clear_bit_with_popcount
basic-block.h
sbitmap_intersection_of_succs -> bitmap_intersection_of_succs
sbitmap_intersection_of_preds -> bitmap_intersection_of_preds
sbitmap_union_of_succs -> bitmap_union_of_succs
sbitmap_union_of_preds -> bitmap_union_of_preds
The sbitmap.h functions also needed their numeric paramter changed
from unsigned int to int to match the bitmap functions.
Callers updated to match.
Tested on x86-64, config-list.mk testing.
Index: gcc/ChangeLog
2012-11-01 Lawrence Crowl <crowl@google.com>
* sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter
type. Update callers to match.
(SET_BIT): Rename bitmap_set_bit, normalizing parameter type. Update
callers to match.
(SET_BIT_WITH_POPCOUNT): Rename bitmap_set_bit_with_popcount,
normalizing parameter type. Update callers to match.
(RESET_BIT): Rename bitmap_clear_bit, normalizing parameter type.
Update callers to match.
(RESET_BIT_WITH_POPCOUNT): Rename bitmap_clear_bit_with_popcount,
normalizing parameter type. Update callers to match.
* basic-block.h (sbitmap_intersection_of_succs): Rename
bitmap_intersection_of_succs. Update callers to match.
* basic-block.h (sbitmap_intersection_of_preds): Rename
bitmap_intersection_of_preds. Update callers to match.
* basic-block.h (sbitmap_union_of_succs): Rename
bitmap_union_of_succs. Update callers to match.
* basic-block.h (sbitmap_union_of_preds): Rename
bitmap_union_of_preds. Update callers to match.
From-SVN: r193066
Diffstat (limited to 'gcc/ebitmap.c')
-rw-r--r-- | gcc/ebitmap.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/gcc/ebitmap.c b/gcc/ebitmap.c index 7c7d58b..8f2e9a6 100644 --- a/gcc/ebitmap.c +++ b/gcc/ebitmap.c @@ -227,7 +227,7 @@ bitmap_clear_bit (ebitmap map, unsigned int bit) return; if (wordindex >= map->wordmask->n_bits - || !TEST_BIT (map->wordmask, wordindex)) + || !bitmap_bit_p (map->wordmask, wordindex)) return; if (map->cache != NULL && map->cacheindex == wordindex) @@ -258,7 +258,7 @@ bitmap_clear_bit (ebitmap map, unsigned int bit) map->cache = map->cache - 1; } - RESET_BIT_WITH_POPCOUNT (map->wordmask, wordindex); + bitmap_clear_bit_with_popcount (map->wordmask, wordindex); memmove(&map->elts[eltwordindex], &map->elts[eltwordindex + 1], sizeof (EBITMAP_ELT_TYPE) * (map->numwords - eltwordindex)); @@ -288,12 +288,12 @@ bitmap_set_bit (ebitmap map, unsigned int bit) /* Allocate a new word in the array and move whatever is in it's place, if necessary. */ - if (!TEST_BIT (map->wordmask, wordindex)) + if (!bitmap_bit_p (map->wordmask, wordindex)) { unsigned long count; unsigned int i; - SET_BIT_WITH_POPCOUNT (map->wordmask, wordindex); + bitmap_set_bit_with_popcount (map->wordmask, wordindex); count = sbitmap_popcount (map->wordmask, wordindex); gcc_assert (count <= map->numwords); @@ -341,7 +341,7 @@ bitmap_bit_p (ebitmap map, unsigned int bit) it's not set in the wordmask, this bit can't exist in our ebitmap. */ if (wordindex >= map->wordmask->n_bits - || !TEST_BIT (map->wordmask, wordindex)) + || !bitmap_bit_p (map->wordmask, wordindex)) return false; /* Find the bit and test it. */ @@ -449,7 +449,7 @@ bitmap_and_into (ebitmap dst, ebitmap src) *dstplace = tmpword; } else - RESET_BIT_WITH_POPCOUNT (dst->wordmask, i); + bitmap_clear_bit_with_popcount (dst->wordmask, i); } #ifdef EBITMAP_DEBUGGING { @@ -494,8 +494,8 @@ bitmap_and (ebitmap dst, ebitmap src1, ebitmap src2) { bool src1hasword, src2hasword; - src1hasword = TEST_BIT (src1->wordmask, i); - src2hasword = TEST_BIT (src2->wordmask, i); + src1hasword = bitmap_bit_p (src1->wordmask, i); + src2hasword = bitmap_bit_p (src2->wordmask, i); if (src1hasword && src2hasword) { @@ -508,7 +508,7 @@ bitmap_and (ebitmap dst, ebitmap src1, ebitmap src2) *dstplace = tmpword; } else - RESET_BIT_WITH_POPCOUNT (dst->wordmask, i); + bitmap_clear_bit_with_popcount (dst->wordmask, i); } else if (src1hasword) src1eltindex++; @@ -603,9 +603,9 @@ bitmap_ior_into (ebitmap dst, ebitmap src) bool dsthasword, srchasword; dsthasword = (i < dst->wordmask->n_bits - && TEST_BIT (dst->wordmask, i)); + && bitmap_bit_p (dst->wordmask, i)); srchasword = (i < src->wordmask->n_bits - && TEST_BIT (src->wordmask, i)); + && bitmap_bit_p (src->wordmask, i)); if (dsthasword && srchasword) { @@ -624,7 +624,7 @@ bitmap_ior_into (ebitmap dst, ebitmap src) { newarray [neweltindex++] = ebitmap_array_get (src, srceltindex++); gcc_assert (i < dst->wordmask->n_bits); - SET_BIT_WITH_POPCOUNT (dst->wordmask, i); + bitmap_set_bit_with_popcount (dst->wordmask, i); changed |= true; } } @@ -712,9 +712,9 @@ bitmap_ior (ebitmap dst, ebitmap src1, ebitmap src2) bool src1hasword, src2hasword; EBITMAP_ELT_TYPE tmpword; src1hasword = (i < src1->wordmask->n_bits - && TEST_BIT (src1->wordmask, i)); + && bitmap_bit_p (src1->wordmask, i)); src2hasword = (i < src2->wordmask->n_bits - && TEST_BIT (src2->wordmask, i)); + && bitmap_bit_p (src2->wordmask, i)); if (src1hasword && src2hasword) { @@ -733,7 +733,7 @@ bitmap_ior (ebitmap dst, ebitmap src1, ebitmap src2) newarray [neweltindex++] = tmpword; } - if (i >= dst->wordmask->n_bits || !TEST_BIT (dst->wordmask, i)) + if (i >= dst->wordmask->n_bits || !bitmap_bit_p (dst->wordmask, i)) { changed = true; } @@ -808,7 +808,7 @@ bitmap_and_compl_into (ebitmap dst, ebitmap src) bool srchasword; srchasword = (i < src->wordmask->n_bits - && TEST_BIT (src->wordmask, i)); + && bitmap_bit_p (src->wordmask, i)); if (srchasword) { @@ -825,7 +825,7 @@ bitmap_and_compl_into (ebitmap dst, ebitmap src) *dstplace = tmpword; } else - RESET_BIT_WITH_POPCOUNT (dst->wordmask, i); + bitmap_clear_bit_with_popcount (dst->wordmask, i); } else { @@ -892,7 +892,7 @@ bitmap_and_compl (ebitmap dst, ebitmap src1, ebitmap src2) EBITMAP_ELT_TYPE tmpword; src2hasword = (i < src2->wordmask->n_bits - && TEST_BIT (src2->wordmask, i)); + && bitmap_bit_p (src2->wordmask, i)); if (src2hasword) { @@ -904,7 +904,7 @@ bitmap_and_compl (ebitmap dst, ebitmap src1, ebitmap src2) newarray[neweltindex++] = tmpword; } else - RESET_BIT_WITH_POPCOUNT (tempmask, i); + bitmap_clear_bit_with_popcount (tempmask, i); } else @@ -914,7 +914,7 @@ bitmap_and_compl (ebitmap dst, ebitmap src1, ebitmap src2) newarray[neweltindex++] = tmpword; } - if (i >= dst->wordmask->n_bits || !TEST_BIT (dst->wordmask, i)) + if (i >= dst->wordmask->n_bits || !bitmap_bit_p (dst->wordmask, i)) { changed = true; } |