summaryrefslogtreecommitdiff
path: root/gcc/tree-into-ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-into-ssa.c')
-rw-r--r--gcc/tree-into-ssa.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index a095ffd634d..e49fb035bc1 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -452,9 +452,8 @@ static void
mark_block_for_update (basic_block bb)
{
gcc_assert (blocks_to_update != NULL);
- if (bitmap_bit_p (blocks_to_update, bb->index))
+ if (!bitmap_set_bit (blocks_to_update, bb->index))
return;
- bitmap_set_bit (blocks_to_update, bb->index);
initialize_flags_in_bb (bb);
}
@@ -557,7 +556,7 @@ set_livein_block (tree var, basic_block bb)
/* Return true if symbol SYM is marked for renaming. */
-static inline bool
+bool
symbol_marked_for_renaming (tree sym)
{
return bitmap_bit_p (SYMS_TO_RENAME (cfun), DECL_UID (sym));
@@ -1144,7 +1143,7 @@ insert_phi_nodes_for (tree var, bitmap phi_insertion_points, bool update_p)
the flowgraph. */
static void
-insert_phi_nodes (bitmap *dfs)
+insert_phi_nodes (bitmap_head *dfs)
{
referenced_var_iterator rvi;
bitmap_iterator bi;
@@ -2350,7 +2349,7 @@ fini_ssa_renamer (void)
static unsigned int
rewrite_into_ssa (void)
{
- bitmap *dfs;
+ bitmap_head *dfs;
basic_block bb;
timevar_push (TV_TREE_SSA_OTHER);
@@ -2368,9 +2367,9 @@ rewrite_into_ssa (void)
sbitmap_zero (interesting_blocks);
/* Initialize dominance frontier. */
- dfs = XNEWVEC (bitmap, last_basic_block);
+ dfs = XNEWVEC (bitmap_head, last_basic_block);
FOR_EACH_BB (bb)
- dfs[bb->index] = BITMAP_ALLOC (NULL);
+ bitmap_initialize (&dfs[bb->index], &bitmap_default_obstack);
/* 1- Compute dominance frontiers. */
calculate_dominance_info (CDI_DOMINATORS);
@@ -2387,7 +2386,7 @@ rewrite_into_ssa (void)
/* Free allocated memory. */
FOR_EACH_BB (bb)
- BITMAP_FREE (dfs[bb->index]);
+ bitmap_clear (&dfs[bb->index]);
free (dfs);
sbitmap_free (interesting_blocks);
@@ -3006,7 +3005,7 @@ release_ssa_name_after_update_ssa (tree name)
names is not pruned. PHI nodes are inserted at every IDF block. */
static void
-insert_updated_phi_nodes_for (tree var, bitmap *dfs, bitmap blocks,
+insert_updated_phi_nodes_for (tree var, bitmap_head *dfs, bitmap blocks,
unsigned update_flags)
{
basic_block entry;
@@ -3333,13 +3332,13 @@ update_ssa (unsigned update_flags)
and for symbols in SYMS_TO_RENAME. */
if (insert_phi_p)
{
- bitmap *dfs;
+ bitmap_head *dfs;
/* If the caller requested PHI nodes to be added, compute
dominance frontiers. */
- dfs = XNEWVEC (bitmap, last_basic_block);
+ dfs = XNEWVEC (bitmap_head, last_basic_block);
FOR_EACH_BB (bb)
- dfs[bb->index] = BITMAP_ALLOC (NULL);
+ bitmap_initialize (&dfs[bb->index], &bitmap_default_obstack);
compute_dominance_frontiers (dfs);
if (sbitmap_first_set_bit (old_ssa_names) >= 0)
@@ -3364,7 +3363,7 @@ update_ssa (unsigned update_flags)
update_flags);
FOR_EACH_BB (bb)
- BITMAP_FREE (dfs[bb->index]);
+ bitmap_clear (&dfs[bb->index]);
free (dfs);
/* Insertion of PHI nodes may have added blocks to the region.