summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/basic-block.h4
-rw-r--r--gcc/cfganal.c10
-rw-r--r--gcc/df-problems.c10
-rw-r--r--gcc/tree-into-ssa.c20
5 files changed, 35 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eff2a56dd45..be4b7c70489 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+2010-06-05 Jan Hubicka <jh@suse.cz>
+
+ * tree-into-ssa.c (insert_phi_nodes): Use bitmap heads
+ for dominance frontiers.
+ (rewrite_into_ssa): Update for bitmap heads in dominance
+ frontiers.
+ (insert_updated_phi_nodes_for): Likewise.
+ (update_ssa): Likewise.
+ * cfganal.c (compute_dominance_frontiers_1): Likewise.
+ (compute_dominance_frontiers): Likewise.
+ (compute_idf): Likewise.
+ * df-problems.c (df_md_local_compute): Likewise.
+
2010-06-05 Anatoly Sokolov <aesok@post.ru>
* target.h (struct gcc_target): Add memory_move_cost field.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 95ad4a90505..1d8d53beb58 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -443,8 +443,8 @@ extern int pre_and_rev_post_order_compute (int *, int *, bool);
extern int dfs_enumerate_from (basic_block, int,
bool (*)(const_basic_block, const void *),
basic_block *, int, const void *);
-extern void compute_dominance_frontiers (bitmap *);
-extern bitmap compute_idf (bitmap, bitmap *);
+extern void compute_dominance_frontiers (struct bitmap_head_def *);
+extern bitmap compute_idf (bitmap, struct bitmap_head_def *);
extern void dump_bb_info (basic_block, bool, bool, int, const char *, FILE *);
extern void dump_edge_info (FILE *, edge, int);
extern void brief_dump_cfg (FILE *);
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index 35749bd76a2..65fe337ab01 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -1256,7 +1256,7 @@ dfs_enumerate_from (basic_block bb, int reverse,
static void
-compute_dominance_frontiers_1 (bitmap *frontiers)
+compute_dominance_frontiers_1 (bitmap_head *frontiers)
{
edge p;
edge_iterator ei;
@@ -1275,7 +1275,7 @@ compute_dominance_frontiers_1 (bitmap *frontiers)
domsb = get_immediate_dominator (CDI_DOMINATORS, b);
while (runner != domsb)
{
- if (!bitmap_set_bit (frontiers[runner->index],
+ if (!bitmap_set_bit (&frontiers[runner->index],
b->index))
break;
runner = get_immediate_dominator (CDI_DOMINATORS,
@@ -1288,7 +1288,7 @@ compute_dominance_frontiers_1 (bitmap *frontiers)
void
-compute_dominance_frontiers (bitmap *frontiers)
+compute_dominance_frontiers (bitmap_head *frontiers)
{
timevar_push (TV_DOM_FRONTIERS);
@@ -1307,7 +1307,7 @@ compute_dominance_frontiers (bitmap *frontiers)
allocated for the return value. */
bitmap
-compute_idf (bitmap def_blocks, bitmap *dfs)
+compute_idf (bitmap def_blocks, bitmap_head *dfs)
{
bitmap_iterator bi;
unsigned bb_index, i;
@@ -1340,7 +1340,7 @@ compute_idf (bitmap def_blocks, bitmap *dfs)
we may pull a non-existing block from the work stack. */
gcc_assert (bb_index < (unsigned) last_basic_block);
- EXECUTE_IF_AND_COMPL_IN_BITMAP (dfs[bb_index], phi_insertion_points,
+ EXECUTE_IF_AND_COMPL_IN_BITMAP (&dfs[bb_index], phi_insertion_points,
0, i, bi)
{
/* Use a safe push because if there is a definition of VAR
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index 30d0ba6a3b2..d4921f50778 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -4390,7 +4390,7 @@ df_md_local_compute (bitmap all_blocks)
unsigned int bb_index, df_bb_index;
bitmap_iterator bi1, bi2;
basic_block bb;
- bitmap *frontiers;
+ bitmap_head *frontiers;
bitmap_initialize (&seen_in_insn, &bitmap_default_obstack);
@@ -4401,9 +4401,9 @@ df_md_local_compute (bitmap all_blocks)
bitmap_clear (&seen_in_insn);
- frontiers = XNEWVEC (bitmap, last_basic_block);
+ frontiers = XNEWVEC (bitmap_head, last_basic_block);
FOR_ALL_BB (bb)
- frontiers[bb->index] = BITMAP_ALLOC (NULL);
+ bitmap_initialize (&frontiers[bb->index], &bitmap_default_obstack);
compute_dominance_frontiers (frontiers);
@@ -4411,7 +4411,7 @@ df_md_local_compute (bitmap all_blocks)
EXECUTE_IF_SET_IN_BITMAP (all_blocks, 0, bb_index, bi1)
{
bitmap kill = &df_md_get_bb_info (bb_index)->kill;
- EXECUTE_IF_SET_IN_BITMAP (frontiers[bb_index], 0, df_bb_index, bi2)
+ EXECUTE_IF_SET_IN_BITMAP (&frontiers[bb_index], 0, df_bb_index, bi2)
{
basic_block bb = BASIC_BLOCK (df_bb_index);
if (bitmap_bit_p (all_blocks, df_bb_index))
@@ -4421,7 +4421,7 @@ df_md_local_compute (bitmap all_blocks)
}
FOR_ALL_BB (bb)
- BITMAP_FREE (frontiers[bb->index]);
+ bitmap_clear (&frontiers[bb->index]);
free (frontiers);
}
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 1468b9f9539..05b313cbe3e 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -1143,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;
@@ -2349,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);
@@ -2367,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);
@@ -2386,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);
@@ -3005,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;
@@ -3332,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)
@@ -3363,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.