Eliminate FOR_ALL_BB macro.

gcc/
	* basic-block.h (FOR_ALL_BB): Eliminate macro.

	* cfg.c (alloc_aux_for_blocks, clear_aux_for_blocks): Replace
	uses of FOR_ALL_BB with FOR_ALL_BB_FN, making uses of cfun explicit.

	* cfganal.c (inverted_post_order_compute): Likewise.
	* cfgcleanup.c (try_optimize_cfg): Likewise.
	* cfgexpand.c (add_scope_conflicts): Likewise.
	* cfghooks.c (dump_flow_info, account_profile_record): Likewise.
	* cfgrtl.c (relink_block_chain): Likewise.
	* dce.c (mark_artificial_uses): Likewise.
	* df-core.c (df_set_blocks, df_compute_cfg_image, df_dump): Likewise.
	* df-problems.c (df_lr_verify_solution_start,
	df_lr_verify_solution_end, df_lr_verify_transfer_functions,
	df_live_verify_solution_start, df_live_verify_solution_end,
	df_live_set_all_dirty, df_live_verify_transfer_functions,
	df_md_local_comput): Likewise.
	* df-scan.c (df_scan_free_internal, df_scan_alloc)
	df_reorganize_refs_by_insn, df_scan_verify): Likewise.
	* dominance.c (compute_dom_fast_query, calculate_dominance_info,
	free_dominance_info): Likewise.
	* dse.c (dse_step1, dse_step3, dse_step4, dse_step6): Likewise.
	* graph.c (draw_cfg_edges): Likewise.
	* graphite-scop-detection.c (print_graphite_scop_statistics,
	dot_all_scops_1): Likewise.
	* graphite.c (print_global_statistics,
	print_graphite_scop_statistics): Likewise.
	* ira.c (do_reload): Likewise.
	* loop-init.c (loop_optimizer_finalize): Likewise.
	* lto-streamer-in.c (input_function): Likewise.
	* lto-streamer-out.c (output_function): Likewise.
	* mcf.c (adjust_cfg_counts): Likewise.
	* predict.c (estimate_loops): Likewise.
	* sched-rgn.c (haifa_find_rgns): Likewise.
	* tree-cfg.c (split_critical_edges): Likewise.
 	* tree-dfa.c (renumber_gimple_stmt_uids): Likewise.
	* tree-loop-distribution.c (tree_loop_distribution): Likewise.
	* tree-ssa-pre.c (compute_antic, insert, init_pre): Likewise.
	* tree-ssa-propagate.c (ssa_prop_init): Likewise.
	* var-tracking.c (vt_initialize, vt_finalize): Likewise.
	* vtable-verify.c (vtable_verify_main): Likewise.
	* web.c (web_main): Likewise.

From-SVN: r205830
This commit is contained in:
David Malcolm 2013-12-09 21:29:15 +00:00 committed by David Malcolm
parent 4f42035e38
commit 04a90bec09
33 changed files with 112 additions and 70 deletions

View File

@ -1,3 +1,48 @@
2013-12-09 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (FOR_ALL_BB): Eliminate macro.
* cfg.c (alloc_aux_for_blocks, clear_aux_for_blocks): Replace
uses of FOR_ALL_BB with FOR_ALL_BB_FN, making uses of cfun explicit.
* cfganal.c (inverted_post_order_compute): Likewise.
* cfgcleanup.c (try_optimize_cfg): Likewise.
* cfgexpand.c (add_scope_conflicts): Likewise.
* cfghooks.c (dump_flow_info, account_profile_record): Likewise.
* cfgrtl.c (relink_block_chain): Likewise.
* dce.c (mark_artificial_uses): Likewise.
* df-core.c (df_set_blocks, df_compute_cfg_image, df_dump): Likewise.
* df-problems.c (df_lr_verify_solution_start,
df_lr_verify_solution_end, df_lr_verify_transfer_functions,
df_live_verify_solution_start, df_live_verify_solution_end,
df_live_set_all_dirty, df_live_verify_transfer_functions,
df_md_local_comput): Likewise.
* df-scan.c (df_scan_free_internal, df_scan_alloc)
df_reorganize_refs_by_insn, df_scan_verify): Likewise.
* dominance.c (compute_dom_fast_query, calculate_dominance_info,
free_dominance_info): Likewise.
* dse.c (dse_step1, dse_step3, dse_step4, dse_step6): Likewise.
* graph.c (draw_cfg_edges): Likewise.
* graphite-scop-detection.c (print_graphite_scop_statistics,
dot_all_scops_1): Likewise.
* graphite.c (print_global_statistics,
print_graphite_scop_statistics): Likewise.
* ira.c (do_reload): Likewise.
* loop-init.c (loop_optimizer_finalize): Likewise.
* lto-streamer-in.c (input_function): Likewise.
* lto-streamer-out.c (output_function): Likewise.
* mcf.c (adjust_cfg_counts): Likewise.
* predict.c (estimate_loops): Likewise.
* sched-rgn.c (haifa_find_rgns): Likewise.
* tree-cfg.c (split_critical_edges): Likewise.
* tree-dfa.c (renumber_gimple_stmt_uids): Likewise.
* tree-loop-distribution.c (tree_loop_distribution): Likewise.
* tree-ssa-pre.c (compute_antic, insert, init_pre): Likewise.
* tree-ssa-propagate.c (ssa_prop_init): Likewise.
* var-tracking.c (vt_initialize, vt_finalize): Likewise.
* vtable-verify.c (vtable_verify_main): Likewise.
* web.c (web_main): Likewise.
2013-12-09 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (FOR_EACH_BB_REVERSE): Eliminate macro.

View File

@ -362,9 +362,6 @@ struct GTY(()) control_flow_graph {
/* Cycles through _all_ basic blocks, even the fake ones (entry and
exit block). */
#define FOR_ALL_BB(BB) \
for (BB = ENTRY_BLOCK_PTR_FOR_FN (cfun); BB; BB = BB->next_bb)
#define FOR_ALL_BB_FN(BB, FN) \
for (BB = ENTRY_BLOCK_PTR_FOR_FN (FN); BB; BB = BB->next_bb)

View File

@ -576,7 +576,7 @@ alloc_aux_for_blocks (int size)
{
basic_block bb;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
alloc_aux_for_block (bb, size);
}
}
@ -588,7 +588,7 @@ clear_aux_for_blocks (void)
{
basic_block bb;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
bb->aux = NULL;
}

View File

@ -784,7 +784,7 @@ inverted_post_order_compute (int *post_order)
bitmap_clear (visited);
/* Put all blocks that have no successor into the initial work list. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
if (EDGE_COUNT (bb->succs) == 0)
{
/* Push the initial edge on to the stack. */

View File

@ -2864,7 +2864,7 @@ try_optimize_cfg (int mode)
while (changed);
}
FOR_ALL_BB (b)
FOR_ALL_BB_FN (b, cfun)
b->flags &= ~(BB_FORWARDER_BLOCK | BB_NONTHREADABLE_BLOCK);
return changed_overall;

View File

@ -498,7 +498,7 @@ add_scope_conflicts (void)
We then do a mostly classical bitmap liveness algorithm. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
bb->aux = BITMAP_ALLOC (&stack_var_bitmap_obstack);
rpo = XNEWVEC (int, last_basic_block_for_fn (cfun));
@ -525,7 +525,7 @@ add_scope_conflicts (void)
free (rpo);
BITMAP_FREE (work);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
BITMAP_FREE (bb->aux);
}

View File

@ -325,7 +325,7 @@ dump_flow_info (FILE *file, int flags)
fprintf (file, "\n%d basic blocks, %d edges.\n", n_basic_blocks_for_fn (cfun),
n_edges_for_fn (cfun));
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
dump_bb (file, bb, 0, flags);
putc ('\n', file);
@ -1408,7 +1408,7 @@ account_profile_record (struct profile_record *record, int after_pass)
int sum;
gcov_type lsum;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
if (bb != EXIT_BLOCK_PTR_FOR_FN (cfun)
&& profile_status_for_fn (cfun) != PROFILE_ABSENT)

View File

@ -3619,7 +3619,7 @@ relink_block_chain (bool stay_in_cfglayout_mode)
EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb = prev_bb;
/* Then, clean up the aux fields. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
bb->aux = NULL;
if (!stay_in_cfglayout_mode)

View File

@ -663,7 +663,7 @@ mark_artificial_uses (void)
struct df_link *defs;
df_ref *use_rec;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
for (use_rec = df_get_artificial_uses (bb->index);
*use_rec; use_rec++)

View File

@ -549,7 +549,7 @@ df_set_blocks (bitmap blocks)
{
basic_block bb;
bitmap_initialize (&blocks_to_reset, &df_bitmap_obstack);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
bitmap_set_bit (&blocks_to_reset, bb->index);
}
@ -1720,7 +1720,7 @@ df_compute_cfg_image (void)
int i;
int * map;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
size += EDGE_COUNT (bb->succs);
}
@ -1728,7 +1728,7 @@ df_compute_cfg_image (void)
map = XNEWVEC (int, size);
map[0] = size;
i = 1;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
edge_iterator ei;
edge e;
@ -2021,7 +2021,7 @@ df_dump (FILE *file)
basic_block bb;
df_dump_start (file);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
df_print_bb_index (bb, file);
df_dump_top (bb, file);

View File

@ -1176,7 +1176,7 @@ df_lr_verify_solution_start (void)
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);
@ -1713,7 +1713,7 @@ df_live_verify_solution_start (void)
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);
@ -4316,7 +4316,7 @@ df_md_local_compute (bitmap all_blocks)
bitmap_clear (&seen_in_insn);
frontiers = XNEWVEC (bitmap_head, last_basic_block_for_fn (cfun));
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
bitmap_initialize (&frontiers[bb->index], &bitmap_default_obstack);
compute_dominance_frontiers (frontiers);
@ -4334,7 +4334,7 @@ df_md_local_compute (bitmap all_blocks)
}
}
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
bitmap_clear (&frontiers[bb->index]);
free (frontiers);
}

View File

@ -213,7 +213,7 @@ df_scan_free_internal (void)
}
}
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
unsigned int bb_index = bb->index;
struct df_scan_bb_info *bb_info = df_scan_get_bb_info (bb_index);
@ -355,7 +355,7 @@ df_scan_alloc (bitmap all_blocks ATTRIBUTE_UNUSED)
df_grow_insn_info ();
df_grow_bb_info (df_scan);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
unsigned int bb_index = bb->index;
struct df_scan_bb_info *bb_info = df_scan_get_bb_info (bb_index);
@ -1887,7 +1887,7 @@ df_reorganize_refs_by_insn (struct df_ref_info *ref_info,
}
else
{
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
offset = df_reorganize_refs_by_insn_bb (bb, offset, ref_info,
include_defs, include_uses,
include_eq_uses);
@ -4569,7 +4569,7 @@ df_scan_verify (void)
clear a mark that has not been set as this means that the ref in
the block or insn was not in the reg chain. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
df_bb_verify (bb);
/* (4) See if all reg chains are traversed a second time. This time

View File

@ -176,7 +176,7 @@ enum df_ref_order
DF_REF_ORDER_BY_REG_WITH_NOTES,
/* Organize the refs in insn order. The insns are ordered within a
block, and the blocks are ordered by FOR_ALL_BB. */
block, and the blocks are ordered by FOR_ALL_BB_FN. */
DF_REF_ORDER_BY_INSN,
/* For uses, the refs within eq notes may be added for

View File

@ -624,7 +624,7 @@ compute_dom_fast_query (enum cdi_direction dir)
if (dom_computed[dir_index] == DOM_OK)
return;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
if (!bb->dom[dir_index]->father)
assign_dfs_numbers (bb->dom[dir_index], &num);
@ -652,7 +652,7 @@ calculate_dominance_info (enum cdi_direction dir)
{
gcc_assert (!n_bbs_in_dom_tree[dir_index]);
FOR_ALL_BB (b)
FOR_ALL_BB_FN (b, cfun)
{
b->dom[dir_index] = et_new_tree (b);
}
@ -689,7 +689,7 @@ free_dominance_info (enum cdi_direction dir)
if (!dom_info_available_p (dir))
return;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
et_free_tree_force (bb->dom[dir_index]);
bb->dom[dir_index] = NULL;

View File

@ -2708,7 +2708,7 @@ dse_step1 (void)
bitmap_set_bit (all_blocks, ENTRY_BLOCK);
bitmap_set_bit (all_blocks, EXIT_BLOCK);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
insn_info_t ptr;
bb_info_t bb_info = (bb_info_t) pool_alloc (bb_info_pool);
@ -3290,7 +3290,7 @@ dse_step3 (bool for_spills)
bitmap_ones (unreachable_blocks);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
bb_info_t bb_info = bb_table[bb->index];
if (bb_info->gen)
@ -3469,7 +3469,7 @@ dse_step4 (void)
basic_block bb;
fprintf (dump_file, "\n\n*** Global dataflow info after analysis.\n");
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
bb_info_t bb_info = bb_table[bb->index];
@ -3617,7 +3617,7 @@ dse_step6 (void)
{
basic_block bb;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
bb_info_t bb_info = bb_table[bb->index];
insn_info_t insn_info = bb_info->last_insn;

View File

@ -255,7 +255,7 @@ draw_cfg_edges (pretty_printer *pp, struct function *fun)
{
basic_block bb;
mark_dfs_back_edges ();
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
draw_cfg_node_succ_edges (pp, fun->funcdef_no, bb);
/* Add an invisible edge from ENTRY to EXIT, to improve the graph layout. */

View File

@ -1114,7 +1114,7 @@ print_graphite_scop_statistics (FILE* file, scop_p scop)
basic_block bb;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator psi;
loop_p loop = bb->loop_father;
@ -1450,7 +1450,7 @@ dot_all_scops_1 (FILE *file, vec<scop_p> scops)
fprintf (file, "digraph all {\n");
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
int part_of_scop = false;
@ -1557,7 +1557,7 @@ dot_all_scops_1 (FILE *file, vec<scop_p> scops)
fprintf (file, " </TABLE>>, shape=box, style=\"setlinewidth(0)\"]\n");
}
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
FOR_EACH_EDGE (e, ei, bb->succs)
fprintf (file, "%d -> %d;\n", bb->index, e->dest->index);

View File

@ -94,7 +94,7 @@ print_global_statistics (FILE* file)
basic_block bb;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator psi;
@ -150,7 +150,7 @@ print_graphite_scop_statistics (FILE* file, scop_p scop)
basic_block bb;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator psi;
loop_p loop = bb->loop_father;

View File

@ -5443,7 +5443,7 @@ do_reload (void)
loop_optimizer_finalize ();
free_dominance_info (CDI_DOMINATORS);
}
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
bb->loop_father = NULL;
current_loops = NULL;
@ -5492,7 +5492,7 @@ do_reload (void)
loop_optimizer_finalize ();
free_dominance_info (CDI_DOMINATORS);
}
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
bb->loop_father = NULL;
current_loops = NULL;

View File

@ -169,7 +169,7 @@ loop_optimizer_finalize (void)
ggc_free (current_loops);
current_loops = NULL;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
bb->loop_father = NULL;
}

View File

@ -976,7 +976,7 @@ input_function (tree fn_decl, struct data_in *data_in,
/* Fix up the call statements that are mentioned in the callgraph
edges. */
set_gimple_stmt_max_uid (cfun, 0);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator gsi;
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
@ -991,7 +991,7 @@ input_function (tree fn_decl, struct data_in *data_in,
}
}
stmts = (gimple *) xcalloc (gimple_stmt_max_uid (fn), sizeof (gimple));
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator bsi = gsi_start_phis (bb);
while (!gsi_end_p (bsi))

View File

@ -1868,7 +1868,7 @@ output_function (struct cgraph_node *node)
virtual PHIs get re-computed on-the-fly which would make numbers
inconsistent. */
set_gimple_stmt_max_uid (cfun, 0);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator gsi;
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))
@ -1887,7 +1887,7 @@ output_function (struct cgraph_node *node)
}
/* To avoid keeping duplicate gimple IDs in the statements, renumber
virtual phis now. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator gsi;
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))

View File

@ -1245,7 +1245,7 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
sum_edge_counts (EXIT_BLOCK_PTR_FOR_FN (cfun)->preds);
/* Compute edge probabilities. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
if (bb->count)
{

View File

@ -2757,7 +2757,7 @@ estimate_loops (void)
estimate_loops_at_level (current_loops->tree_root->inner);
/* Now propagate the frequencies through all the blocks. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
bitmap_set_bit (tovisit, bb->index);
}

View File

@ -745,7 +745,7 @@ haifa_find_rgns (void)
}
/* Reset ->aux field used by EDGE_PASSED. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
edge_iterator ei;
edge e;

View File

@ -7940,7 +7940,7 @@ split_critical_edges (void)
expensive. So we want to enable recording of edge to CASE_LABEL_EXPR
mappings around the calls to split_edge. */
start_recording_case_labels ();
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
FOR_EACH_EDGE (e, ei, bb->succs)
{

View File

@ -80,7 +80,7 @@ renumber_gimple_stmt_uids (void)
basic_block bb;
set_gimple_stmt_max_uid (cfun, 0);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator bsi;
for (bsi = gsi_start_phis (bb); !gsi_end_p (bsi); gsi_next (&bsi))

View File

@ -1677,7 +1677,7 @@ tree_loop_distribution (void)
basic_block bb;
control_dependences *cd = NULL;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator gsi;
for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi))

View File

@ -2444,7 +2444,7 @@ compute_antic (void)
has_abnormal_preds = sbitmap_alloc (last_basic_block_for_fn (cfun));
bitmap_clear (has_abnormal_preds);
FOR_ALL_BB (block)
FOR_ALL_BB_FN (block, cfun)
{
edge_iterator ei;
edge e;
@ -3659,7 +3659,7 @@ insert (void)
basic_block bb;
int num_iterations = 0;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
NEW_SETS (bb) = bitmap_set_new ();
while (new_stuff)
@ -3672,7 +3672,7 @@ insert (void)
/* Clear the NEW sets before the next iteration. We have already
fully propagated its contents. */
if (new_stuff)
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
bitmap_set_free (NEW_SETS (bb));
}
statistics_histogram_event (cfun, "insert iterations", num_iterations);
@ -4671,7 +4671,7 @@ init_pre (void)
sizeof (struct bitmap_set), 30);
pre_expr_pool = create_alloc_pool ("pre_expr nodes",
sizeof (struct pre_expr_d), 30);
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
EXP_GEN (bb) = bitmap_set_new ();
PHI_GEN (bb) = bitmap_set_new ();

View File

@ -509,7 +509,7 @@ ssa_prop_init (void)
/* Initially assume that every edge in the CFG is not executable.
(including the edges coming out of the entry block). */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
gimple_stmt_iterator si;

View File

@ -9847,7 +9847,7 @@ vt_initialize (void)
changed_variables.create (10);
/* Init the IN and OUT sets. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
VTI (bb)->visited = false;
VTI (bb)->flooded = false;
@ -10186,7 +10186,7 @@ vt_finalize (void)
VTI (bb)->mos.release ();
}
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
{
dataflow_set_destroy (&VTI (bb)->in);
dataflow_set_destroy (&VTI (bb)->out);

View File

@ -735,7 +735,7 @@ vtable_verify_main (void)
unsigned int ret = 1;
basic_block bb;
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
verify_bb_vtables (bb);
return ret;

View File

@ -351,7 +351,7 @@ web_main (void)
df_set_flags (DF_DEFER_INSN_RESCAN);
/* Assign ids to the uses. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
FOR_BB_INSNS (bb, insn)
{
unsigned int uid = INSN_UID (insn);
@ -379,7 +379,7 @@ web_main (void)
use_entry = XCNEWVEC (struct web_entry, uses_num);
/* Produce the web. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
FOR_BB_INSNS (bb, insn)
{
unsigned int uid = INSN_UID (insn);
@ -404,7 +404,7 @@ web_main (void)
/* Update the instruction stream, allocating new registers for split pseudos
in progress. */
FOR_ALL_BB (bb)
FOR_ALL_BB_FN (bb, cfun)
FOR_BB_INSNS (bb, insn)
{
unsigned int uid = INSN_UID (insn);