diff options
author | crowl <crowl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-01 19:23:35 +0000 |
---|---|---|
committer | crowl <crowl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-01 19:23:35 +0000 |
commit | 08b7917c9ede0f12b38f238f2fdb433854f0da33 (patch) | |
tree | 5ec5bcd56906f1ff213b4652971a165736d6fda7 /gcc/sbitmap.h | |
parent | f7b7100e9aa399db38d35bb83418f9e291471eb8 (diff) | |
download | gcc-08b7917c9ede0f12b38f238f2fdb433854f0da33.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193066 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sbitmap.h')
-rw-r--r-- | gcc/sbitmap.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/sbitmap.h b/gcc/sbitmap.h index f7fa7706d0a..02e3c8147c8 100644 --- a/gcc/sbitmap.h +++ b/gcc/sbitmap.h @@ -34,9 +34,9 @@ along with GCC; see the file COPYING3. If not see The following operations can be performed in O(1) time: * set_size : SBITMAP_SIZE - * member_p : TEST_BIT - * add_member : SET_BIT - * remove_member : RESET_BIT + * member_p : bitmap_bit_p + * add_member : bitmap_set_bit + * remove_member : bitmap_clear_bit Most other operations on this set representation are O(U) where U is the size of the set universe: @@ -100,7 +100,7 @@ struct simple_bitmap_def /* Test if bit number bitno in the bitmap is set. */ static inline SBITMAP_ELT_TYPE -TEST_BIT (const_sbitmap map, unsigned int bitno) +bitmap_bit_p (const_sbitmap map, int bitno) { size_t i = bitno / SBITMAP_ELT_BITS; unsigned int s = bitno % SBITMAP_ELT_BITS; @@ -110,21 +110,21 @@ TEST_BIT (const_sbitmap map, unsigned int bitno) /* Set bit number BITNO in the sbitmap MAP. */ static inline void -SET_BIT (sbitmap map, unsigned int bitno) +bitmap_set_bit (sbitmap map, int bitno) { gcc_checking_assert (! map->popcount); map->elms[bitno / SBITMAP_ELT_BITS] |= (SBITMAP_ELT_TYPE) 1 << (bitno) % SBITMAP_ELT_BITS; } -/* Like SET_BIT, but updates population count. */ +/* Like bitmap_set_bit, but updates population count. */ static inline void -SET_BIT_WITH_POPCOUNT (sbitmap map, unsigned int bitno) +bitmap_set_bit_with_popcount (sbitmap map, int bitno) { bool oldbit; gcc_checking_assert (map->popcount); - oldbit = TEST_BIT (map, bitno); + oldbit = bitmap_bit_p (map, bitno); if (!oldbit) map->popcount[bitno / SBITMAP_ELT_BITS]++; map->elms[bitno / SBITMAP_ELT_BITS] @@ -134,21 +134,21 @@ SET_BIT_WITH_POPCOUNT (sbitmap map, unsigned int bitno) /* Reset bit number BITNO in the sbitmap MAP. */ static inline void -RESET_BIT (sbitmap map, unsigned int bitno) +bitmap_clear_bit (sbitmap map, int bitno) { gcc_checking_assert (! map->popcount); map->elms[bitno / SBITMAP_ELT_BITS] &= ~((SBITMAP_ELT_TYPE) 1 << (bitno) % SBITMAP_ELT_BITS); } -/* Like RESET_BIT, but updates population count. */ +/* Like bitmap_clear_bit, but updates population count. */ static inline void -RESET_BIT_WITH_POPCOUNT (sbitmap map, unsigned int bitno) +bitmap_clear_bit_with_popcount (sbitmap map, int bitno) { bool oldbit; gcc_checking_assert (map->popcount); - oldbit = TEST_BIT (map, bitno); + oldbit = bitmap_bit_p (map, bitno); if (oldbit) map->popcount[bitno / SBITMAP_ELT_BITS]--; map->elms[bitno / SBITMAP_ELT_BITS] |