aboutsummaryrefslogtreecommitdiff
path: root/gcc/genautomata.c
diff options
context:
space:
mode:
authorLawrence Crowl <crowl@google.com>2012-11-01 19:23:35 +0000
committerLawrence Crowl <crowl@gcc.gnu.org>2012-11-01 19:23:35 +0000
commitd7c028c07b1998cc80f67e053c8131cf8b387af7 (patch)
tree5ec5bcd56906f1ff213b4652971a165736d6fda7 /gcc/genautomata.c
parent6cd1dd26753a93d9916335a6f698857915d273c2 (diff)
downloadgcc-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/genautomata.c')
-rw-r--r--gcc/genautomata.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index 46a398d..102e7d2 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -3424,7 +3424,7 @@ finish_alt_states (void)
/* Set bit number bitno in the bit string. The macro is not side
effect proof. */
-#define SET_BIT(bitstring, bitno) \
+#define bitmap_set_bit(bitstring, bitno) \
((bitstring)[(bitno) / (sizeof (*(bitstring)) * CHAR_BIT)] |= \
(HOST_WIDE_INT)1 << (bitno) % (sizeof (*(bitstring)) * CHAR_BIT))
@@ -3434,7 +3434,7 @@ finish_alt_states (void)
/* Test if bit number bitno in the bitstring is set. The macro is not
side effect proof. */
-#define TEST_BIT(bitstring, bitno) \
+#define bitmap_bit_p(bitstring, bitno) \
((bitstring)[(bitno) / (sizeof (*(bitstring)) * CHAR_BIT)] >> \
(bitno) % (sizeof (*(bitstring)) * CHAR_BIT) & 1)
@@ -3563,7 +3563,7 @@ static void
set_unit_reserv (reserv_sets_t reservs, int cycle_num, int unit_num)
{
gcc_assert (cycle_num < max_cycles_num);
- SET_BIT (reservs, cycle_num * els_in_cycle_reserv
+ bitmap_set_bit (reservs, cycle_num * els_in_cycle_reserv
* sizeof (set_el_t) * CHAR_BIT + unit_num);
}
@@ -3573,7 +3573,7 @@ static int
test_unit_reserv (reserv_sets_t reservs, int cycle_num, int unit_num)
{
gcc_assert (cycle_num < max_cycles_num);
- return TEST_BIT (reservs, cycle_num * els_in_cycle_reserv
+ return bitmap_bit_p (reservs, cycle_num * els_in_cycle_reserv
* sizeof (set_el_t) * CHAR_BIT + unit_num);
}
@@ -3677,7 +3677,7 @@ output_cycle_reservs (FILE *f, reserv_sets_t reservs, int start_cycle,
reserved_units_num = 0;
for (unit_num = 0; unit_num < description->units_num; unit_num++)
- if (TEST_BIT (reservs, start_cycle * els_in_cycle_reserv
+ if (bitmap_bit_p (reservs, start_cycle * els_in_cycle_reserv
* sizeof (set_el_t) * CHAR_BIT + unit_num))
reserved_units_num++;
gcc_assert (repetition_num > 0);
@@ -3687,7 +3687,7 @@ output_cycle_reservs (FILE *f, reserv_sets_t reservs, int start_cycle,
for (unit_num = 0;
unit_num < description->units_num;
unit_num++)
- if (TEST_BIT (reservs, start_cycle * els_in_cycle_reserv
+ if (bitmap_bit_p (reservs, start_cycle * els_in_cycle_reserv
* sizeof (set_el_t) * CHAR_BIT + unit_num))
{
if (reserved_units_num != 0)
@@ -4279,7 +4279,7 @@ initiate_excl_sets (void)
el != NULL;
el = el->next_unit_set_el)
{
- SET_BIT (unit_excl_set, el->unit_decl->unit_num);
+ bitmap_set_bit (unit_excl_set, el->unit_decl->unit_num);
el->unit_decl->in_set_p = TRUE;
}
unit_excl_set_table [DECL_UNIT (decl)->unit_num] = unit_excl_set;
@@ -4344,7 +4344,7 @@ form_reserv_sets_list (pattern_set_el_t pattern_list)
curr->next_pattern_reserv = NULL;
for (i = 0; i < el->units_num; i++)
{
- SET_BIT (curr->reserv, el->unit_decls [i]->unit_num);
+ bitmap_set_bit (curr->reserv, el->unit_decls [i]->unit_num);
el->unit_decls [i]->in_set_p = TRUE;
}
if (prev != NULL)