summaryrefslogtreecommitdiff
path: root/gcc/df-problems.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/df-problems.c')
-rw-r--r--gcc/df-problems.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index c6349c8b0a5..4b926b6ee74 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -353,7 +353,7 @@ df_rd_bb_local_compute_process_def (struct df_rd_bb_info *bb_info,
static void
df_rd_bb_local_compute (unsigned int bb_index)
{
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
struct df_rd_bb_info *bb_info = df_rd_get_bb_info (bb_index);
rtx insn;
@@ -835,7 +835,7 @@ df_lr_reset (bitmap all_blocks)
static void
df_lr_bb_local_compute (unsigned int bb_index)
{
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
struct df_lr_bb_info *bb_info = df_lr_get_bb_info (bb_index);
rtx insn;
df_ref *def_rec;
@@ -1173,10 +1173,10 @@ df_lr_verify_solution_start (void)
df_lr->solutions_dirty = true;
problem_data = (struct df_lr_problem_data *)df_lr->problem_data;
- problem_data->in = XNEWVEC (bitmap_head, last_basic_block);
- problem_data->out = XNEWVEC (bitmap_head, last_basic_block);
+ problem_data->in = XNEWVEC (bitmap_head, last_basic_block_for_fn (cfun));
+ problem_data->out = XNEWVEC (bitmap_head, last_basic_block_for_fn (cfun));
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
{
bitmap_initialize (&problem_data->in[bb->index], &problem_data->lr_bitmaps);
bitmap_initialize (&problem_data->out[bb->index], &problem_data->lr_bitmaps);
@@ -1205,7 +1205,7 @@ df_lr_verify_solution_end (void)
in df_lr_finalize for details. */
df_lr->solutions_dirty = false;
else
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
{
if ((!bitmap_equal_p (&problem_data->in[bb->index], DF_LR_IN (bb)))
|| (!bitmap_equal_p (&problem_data->out[bb->index], DF_LR_OUT (bb))))
@@ -1217,7 +1217,7 @@ df_lr_verify_solution_end (void)
/* Cannot delete them immediately because you may want to dump them
if the comparison fails. */
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
{
bitmap_clear (&problem_data->in[bb->index]);
bitmap_clear (&problem_data->out[bb->index]);
@@ -1294,7 +1294,7 @@ df_lr_verify_transfer_functions (void)
bitmap_initialize (&saved_use, &bitmap_default_obstack);
bitmap_initialize (&all_blocks, &bitmap_default_obstack);
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
{
struct df_lr_bb_info *bb_info = df_lr_get_bb_info (bb->index);
bitmap_set_bit (&all_blocks, bb->index);
@@ -1462,7 +1462,7 @@ df_live_reset (bitmap all_blocks)
static void
df_live_bb_local_compute (unsigned int bb_index)
{
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
struct df_live_bb_info *bb_info = df_live_get_bb_info (bb_index);
rtx insn;
df_ref *def_rec;
@@ -1710,10 +1710,10 @@ df_live_verify_solution_start (void)
df_live->solutions_dirty = true;
problem_data = (struct df_live_problem_data *)df_live->problem_data;
- problem_data->in = XNEWVEC (bitmap_head, last_basic_block);
- problem_data->out = XNEWVEC (bitmap_head, last_basic_block);
+ problem_data->in = XNEWVEC (bitmap_head, last_basic_block_for_fn (cfun));
+ problem_data->out = XNEWVEC (bitmap_head, last_basic_block_for_fn (cfun));
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
{
bitmap_initialize (&problem_data->in[bb->index], &problem_data->live_bitmaps);
bitmap_initialize (&problem_data->out[bb->index], &problem_data->live_bitmaps);
@@ -1736,7 +1736,7 @@ df_live_verify_solution_end (void)
if (!problem_data->out)
return;
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
{
if ((!bitmap_equal_p (&problem_data->in[bb->index], DF_LIVE_IN (bb)))
|| (!bitmap_equal_p (&problem_data->out[bb->index], DF_LIVE_OUT (bb))))
@@ -1748,7 +1748,7 @@ df_live_verify_solution_end (void)
/* Cannot delete them immediately because you may want to dump them
if the comparison fails. */
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
{
bitmap_clear (&problem_data->in[bb->index]);
bitmap_clear (&problem_data->out[bb->index]);
@@ -1814,7 +1814,7 @@ void
df_live_set_all_dirty (void)
{
basic_block bb;
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
bitmap_set_bit (df_live->out_of_date_transfer_functions,
bb->index);
}
@@ -1840,7 +1840,7 @@ df_live_verify_transfer_functions (void)
df_grow_insn_info ();
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
{
struct df_live_bb_info *bb_info = df_live_get_bb_info (bb->index);
bitmap_set_bit (&all_blocks, bb->index);
@@ -1987,7 +1987,7 @@ df_chain_remove_problem (void)
rtx insn;
df_ref *def_rec;
df_ref *use_rec;
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
if (df_chain_problem_p (DF_DU_CHAIN))
for (def_rec = df_get_artificial_defs (bb->index); *def_rec; def_rec++)
@@ -2105,7 +2105,7 @@ df_chain_create_bb_process_use (bitmap local_rd,
static void
df_chain_create_bb (unsigned int bb_index)
{
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
struct df_rd_bb_info *bb_info = df_rd_get_bb_info (bb_index);
rtx insn;
bitmap_head cpy;
@@ -2427,7 +2427,7 @@ df_word_lr_alloc (bitmap all_blocks ATTRIBUTE_UNUSED)
bitmap_obstack_initialize (&problem_data->word_lr_bitmaps);
- FOR_EACH_BB (bb)
+ FOR_EACH_BB_FN (bb, cfun)
bitmap_set_bit (df_word_lr->out_of_date_transfer_functions, bb->index);
bitmap_set_bit (df_word_lr->out_of_date_transfer_functions, ENTRY_BLOCK);
@@ -2531,7 +2531,7 @@ df_word_lr_mark_ref (df_ref ref, bool is_set, regset live)
static void
df_word_lr_bb_local_compute (unsigned int bb_index)
{
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
struct df_word_lr_bb_info *bb_info = df_word_lr_get_bb_info (bb_index);
rtx insn;
df_ref *def_rec;
@@ -3154,7 +3154,7 @@ static void
df_note_bb_compute (unsigned int bb_index,
bitmap live, bitmap do_not_gen, bitmap artificial_uses)
{
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
rtx insn;
df_ref *def_rec;
df_ref *use_rec;
@@ -4271,7 +4271,7 @@ df_md_bb_local_compute_process_def (struct df_md_bb_info *bb_info,
static void
df_md_bb_local_compute (unsigned int bb_index)
{
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
struct df_md_bb_info *bb_info = df_md_get_bb_info (bb_index);
rtx insn;
@@ -4315,8 +4315,8 @@ df_md_local_compute (bitmap all_blocks)
bitmap_clear (&seen_in_insn);
- frontiers = XNEWVEC (bitmap_head, last_basic_block);
- FOR_ALL_BB (bb)
+ frontiers = XNEWVEC (bitmap_head, last_basic_block_for_fn (cfun));
+ FOR_ALL_BB_FN (bb, cfun)
bitmap_initialize (&frontiers[bb->index], &bitmap_default_obstack);
compute_dominance_frontiers (frontiers);
@@ -4327,14 +4327,14 @@ df_md_local_compute (bitmap all_blocks)
bitmap kill = &df_md_get_bb_info (bb_index)->kill;
EXECUTE_IF_SET_IN_BITMAP (&frontiers[bb_index], 0, df_bb_index, bi2)
{
- basic_block bb = BASIC_BLOCK (df_bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, df_bb_index);
if (bitmap_bit_p (all_blocks, df_bb_index))
bitmap_ior_and_into (&df_md_get_bb_info (df_bb_index)->init, kill,
df_get_live_in (bb));
}
}
- FOR_ALL_BB (bb)
+ FOR_ALL_BB_FN (bb, cfun)
bitmap_clear (&frontiers[bb->index]);
free (frontiers);
}
@@ -4360,7 +4360,7 @@ df_md_reset (bitmap all_blocks)
static bool
df_md_transfer_function (int bb_index)
{
- basic_block bb = BASIC_BLOCK (bb_index);
+ basic_block bb = BASIC_BLOCK_FOR_FN (cfun, bb_index);
struct df_md_bb_info *bb_info = df_md_get_bb_info (bb_index);
bitmap in = &bb_info->in;
bitmap out = &bb_info->out;