aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfganal.c
diff options
context:
space:
mode:
authorcrowl <crowl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-01 19:23:35 +0000
committercrowl <crowl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-01 19:23:35 +0000
commit08b7917c9ede0f12b38f238f2fdb433854f0da33 (patch)
tree5ec5bcd56906f1ff213b4652971a165736d6fda7 /gcc/cfganal.c
parentf7b7100e9aa399db38d35bb83418f9e291471eb8 (diff)
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/cfganal.c')
-rw-r--r--gcc/cfganal.c52
1 files changed, 24 insertions, 28 deletions
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index 4bef629d13b..214e468d46e 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -102,10 +102,10 @@ mark_dfs_back_edges (void)
ei_edge (ei)->flags &= ~EDGE_DFS_BACK;
/* Check if the edge destination has been visited yet. */
- if (dest != EXIT_BLOCK_PTR && ! TEST_BIT (visited, dest->index))
+ if (dest != EXIT_BLOCK_PTR && ! bitmap_bit_p (visited, dest->index))
{
/* Mark that we have visited the destination. */
- SET_BIT (visited, dest->index);
+ bitmap_set_bit (visited, dest->index);
pre[dest->index] = prenum++;
if (EDGE_COUNT (dest->succs) > 0)
@@ -518,10 +518,10 @@ post_order_compute (int *post_order, bool include_entry_exit,
dest = ei_edge (ei)->dest;
/* Check if the edge destination has been visited yet. */
- if (dest != EXIT_BLOCK_PTR && ! TEST_BIT (visited, dest->index))
+ if (dest != EXIT_BLOCK_PTR && ! bitmap_bit_p (visited, dest->index))
{
/* Mark that we have visited the destination. */
- SET_BIT (visited, dest->index);
+ bitmap_set_bit (visited, dest->index);
if (EDGE_COUNT (dest->succs) > 0)
/* Since the DEST node has been visited for the first
@@ -560,7 +560,7 @@ post_order_compute (int *post_order, bool include_entry_exit,
{
next_bb = b->next_bb;
- if (!(TEST_BIT (visited, b->index)))
+ if (!(bitmap_bit_p (visited, b->index)))
delete_basic_block (b);
}
@@ -664,7 +664,7 @@ inverted_post_order_compute (int *post_order)
if (EDGE_COUNT (bb->preds) > 0)
{
stack[sp++] = ei_start (bb->preds);
- SET_BIT (visited, bb->index);
+ bitmap_set_bit (visited, bb->index);
}
}
@@ -684,10 +684,10 @@ inverted_post_order_compute (int *post_order)
pred = ei_edge (ei)->src;
/* Check if the predecessor has been visited yet. */
- if (! TEST_BIT (visited, pred->index))
+ if (! bitmap_bit_p (visited, pred->index))
{
/* Mark that we have visited the destination. */
- SET_BIT (visited, pred->index);
+ bitmap_set_bit (visited, pred->index);
if (EDGE_COUNT (pred->preds) > 0)
/* Since the predecessor node has been visited for the first
@@ -712,7 +712,7 @@ inverted_post_order_compute (int *post_order)
Note that this doesn't check EXIT_BLOCK itself
since EXIT_BLOCK is always added after the outer do-while loop. */
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
- if (!TEST_BIT (visited, bb->index))
+ if (!bitmap_bit_p (visited, bb->index))
{
has_unvisited_bb = true;
@@ -725,7 +725,7 @@ inverted_post_order_compute (int *post_order)
/* Find an already visited predecessor. */
FOR_EACH_EDGE (e, ei, bb->preds)
{
- if (TEST_BIT (visited, e->src->index))
+ if (bitmap_bit_p (visited, e->src->index))
visited_pred = e->src;
}
@@ -733,7 +733,7 @@ inverted_post_order_compute (int *post_order)
{
basic_block be = dfs_find_deadend (bb);
gcc_assert (be != NULL);
- SET_BIT (visited, be->index);
+ bitmap_set_bit (visited, be->index);
stack[sp++] = ei_start (be->preds);
break;
}
@@ -746,7 +746,7 @@ inverted_post_order_compute (int *post_order)
Find a dead-end from the ENTRY, and restart the iteration. */
basic_block be = dfs_find_deadend (ENTRY_BLOCK_PTR);
gcc_assert (be != NULL);
- SET_BIT (visited, be->index);
+ bitmap_set_bit (visited, be->index);
stack[sp++] = ei_start (be->preds);
}
@@ -820,10 +820,10 @@ pre_and_rev_post_order_compute (int *pre_order, int *rev_post_order,
dest = ei_edge (ei)->dest;
/* Check if the edge destination has been visited yet. */
- if (dest != EXIT_BLOCK_PTR && ! TEST_BIT (visited, dest->index))
+ if (dest != EXIT_BLOCK_PTR && ! bitmap_bit_p (visited, dest->index))
{
/* Mark that we have visited the destination. */
- SET_BIT (visited, dest->index);
+ bitmap_set_bit (visited, dest->index);
if (pre_order)
pre_order[pre_order_num] = dest->index;
@@ -929,7 +929,7 @@ static void
flow_dfs_compute_reverse_add_bb (depth_first_search_ds data, basic_block bb)
{
data->stack[data->sp++] = bb;
- SET_BIT (data->visited_blocks, bb->index);
+ bitmap_set_bit (data->visited_blocks, bb->index);
}
/* Continue the depth-first search through the reverse graph starting with the
@@ -951,13 +951,13 @@ flow_dfs_compute_reverse_execute (depth_first_search_ds data,
/* Perform depth-first search on adjacent vertices. */
FOR_EACH_EDGE (e, ei, bb->preds)
- if (!TEST_BIT (data->visited_blocks, e->src->index))
+ if (!bitmap_bit_p (data->visited_blocks, e->src->index))
flow_dfs_compute_reverse_add_bb (data, e->src);
}
/* Determine if there are unvisited basic blocks. */
FOR_BB_BETWEEN (bb, last_unvisited, NULL, prev_bb)
- if (!TEST_BIT (data->visited_blocks, bb->index))
+ if (!bitmap_bit_p (data->visited_blocks, bb->index))
return dfs_find_deadend (bb);
return NULL;
@@ -993,9 +993,9 @@ dfs_enumerate_from (basic_block bb, int reverse,
static sbitmap visited;
static unsigned v_size;
-#define MARK_VISITED(BB) (SET_BIT (visited, (BB)->index))
-#define UNMARK_VISITED(BB) (RESET_BIT (visited, (BB)->index))
-#define VISITED_P(BB) (TEST_BIT (visited, (BB)->index))
+#define MARK_VISITED(BB) (bitmap_set_bit (visited, (BB)->index))
+#define UNMARK_VISITED(BB) (bitmap_clear_bit (visited, (BB)->index))
+#define VISITED_P(BB) (bitmap_bit_p (visited, (BB)->index))
/* Resize the VISITED sbitmap if necessary. */
size = last_basic_block;
@@ -1193,8 +1193,7 @@ compute_idf (bitmap def_blocks, bitmap_head *dfs)
basic block B. */
void
-sbitmap_intersection_of_succs (sbitmap dst, sbitmap *src,
- basic_block b)
+bitmap_intersection_of_succs (sbitmap dst, sbitmap *src, basic_block b)
{
unsigned int set_size = dst->size;
edge e;
@@ -1235,8 +1234,7 @@ sbitmap_intersection_of_succs (sbitmap dst, sbitmap *src,
basic block B. */
void
-sbitmap_intersection_of_preds (sbitmap dst, sbitmap *src,
- basic_block b)
+bitmap_intersection_of_preds (sbitmap dst, sbitmap *src, basic_block b)
{
unsigned int set_size = dst->size;
edge e;
@@ -1277,8 +1275,7 @@ sbitmap_intersection_of_preds (sbitmap dst, sbitmap *src,
basic block B. */
void
-sbitmap_union_of_succs (sbitmap dst, sbitmap *src,
- basic_block b)
+bitmap_union_of_succs (sbitmap dst, sbitmap *src, basic_block b)
{
unsigned int set_size = dst->size;
edge e;
@@ -1319,8 +1316,7 @@ sbitmap_union_of_succs (sbitmap dst, sbitmap *src,
basic block B. */
void
-sbitmap_union_of_preds (sbitmap dst, sbitmap *src,
- basic_block b)
+bitmap_union_of_preds (sbitmap dst, sbitmap *src, basic_block b)
{
unsigned int set_size = dst->size;
edge e;