diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-09 21:16:25 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-09 21:16:25 +0000 |
commit | 7a46197ba8ded22c042ef01b299f94e89b54b3ce (patch) | |
tree | 787ef1ec64caf5f9b9d97ab45f8fb7979f442b3b /gcc | |
parent | fc00614f7eecf6a705a3e6da708ec8d7878d83d2 (diff) | |
download | gcc-7a46197ba8ded22c042ef01b299f94e89b54b3ce.tar.gz |
Eliminate FOR_EACH_BB_REVERSE macro.
gcc/
* basic-block.h (FOR_EACH_BB_REVERSE): Eliminate macro.
* cfghooks.c (verify_flow_info): Replace uses of FOR_EACH_BB_REVERSE
with FOR_EACH_BB_REVERSE_FN, making uses of cfun explicit.
* cfgrtl.c (print_rtl_with_bb, rtl_verify_edges,
rtl_verify_bb_insns, rtl_verify_bb_pointers,
rtl_verify_bb_insn_chain, rtl_verify_fallthru): Likewise.
* config/ia64/ia64.c (emit_predicate_relation_info): Likewise.
* config/sh/sh.c (sh_md_init_global): Likewise.
* config/sh/sh_optimize_sett_clrt.cc
(sh_optimize_sett_clrt::execute): Likewise.
* dce.c (reset_unmarked_insns_debug_uses, delete_unmarked_insns):
Likewise.
* dominance.c (calc_dfs_tree): Likewise.
* final.c (final): Likewise.
* function.c (thread_prologue_and_epilogue_insns): Likewise.
* gcse.c (compute_code_hoist_vbeinout): Likewise.
* ira.c (update_equiv_regs, build_insn_chain): Likewise.
* lcm.c (compute_antinout_edge): Likewise.
* mode-switching.c (optimize_mode_switching): Likewise.
* postreload.c (reload_combine): Likewise.
* recog.c (split_all_insns, peephole2_optimize): Likewise.
* tree-ssa-live.c (live_worklist): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205829 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 26 | ||||
-rw-r--r-- | gcc/basic-block.h | 2 | ||||
-rw-r--r-- | gcc/cfghooks.c | 2 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 12 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 4 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 2 | ||||
-rw-r--r-- | gcc/config/sh/sh_optimize_sett_clrt.cc | 2 | ||||
-rw-r--r-- | gcc/dce.c | 4 | ||||
-rw-r--r-- | gcc/dominance.c | 4 | ||||
-rw-r--r-- | gcc/final.c | 2 | ||||
-rw-r--r-- | gcc/function.c | 2 | ||||
-rw-r--r-- | gcc/gcse.c | 2 | ||||
-rw-r--r-- | gcc/ira.c | 4 | ||||
-rw-r--r-- | gcc/lcm.c | 2 | ||||
-rw-r--r-- | gcc/mode-switching.c | 4 | ||||
-rw-r--r-- | gcc/postreload.c | 2 | ||||
-rw-r--r-- | gcc/recog.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-live.c | 2 |
18 files changed, 53 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a53226154c..0ddcecb92d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,31 @@ 2013-12-09 David Malcolm <dmalcolm@redhat.com> + * basic-block.h (FOR_EACH_BB_REVERSE): Eliminate macro. + + * cfghooks.c (verify_flow_info): Replace uses of FOR_EACH_BB_REVERSE + with FOR_EACH_BB_REVERSE_FN, making uses of cfun explicit. + * cfgrtl.c (print_rtl_with_bb, rtl_verify_edges, + rtl_verify_bb_insns, rtl_verify_bb_pointers, + rtl_verify_bb_insn_chain, rtl_verify_fallthru): Likewise. + * config/ia64/ia64.c (emit_predicate_relation_info): Likewise. + * config/sh/sh.c (sh_md_init_global): Likewise. + * config/sh/sh_optimize_sett_clrt.cc + (sh_optimize_sett_clrt::execute): Likewise. + * dce.c (reset_unmarked_insns_debug_uses, delete_unmarked_insns): + Likewise. + * dominance.c (calc_dfs_tree): Likewise. + * final.c (final): Likewise. + * function.c (thread_prologue_and_epilogue_insns): Likewise. + * gcse.c (compute_code_hoist_vbeinout): Likewise. + * ira.c (update_equiv_regs, build_insn_chain): Likewise. + * lcm.c (compute_antinout_edge): Likewise. + * mode-switching.c (optimize_mode_switching): Likewise. + * postreload.c (reload_combine): Likewise. + * recog.c (split_all_insns, peephole2_optimize): Likewise. + * tree-ssa-live.c (live_worklist): Likewise. + +2013-12-09 David Malcolm <dmalcolm@redhat.com> + * basic-block.h (FOR_EACH_BB): Eliminate macro. * asan.c (transform_statements, execute_sanopt): Eliminate diff --git a/gcc/basic-block.h b/gcc/basic-block.h index b378a5b240c..75f16acf525 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -336,8 +336,6 @@ struct GTY(()) control_flow_graph { #define FOR_EACH_BB_REVERSE_FN(BB, FN) \ FOR_BB_BETWEEN (BB, (FN)->cfg->x_exit_block_ptr->prev_bb, (FN)->cfg->x_entry_block_ptr, prev_bb) -#define FOR_EACH_BB_REVERSE(BB) FOR_EACH_BB_REVERSE_FN (BB, cfun) - /* For iterating over insns in basic block. */ #define FOR_BB_INSNS(BB, INSN) \ for ((INSN) = BB_HEAD (BB); \ diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index 24009655631..78218b5f56e 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -123,7 +123,7 @@ verify_flow_info (void) } /* Now check the basic blocks (boundaries etc.) */ - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { int n_fallthru = 0; edge e; diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index daadd9b0e2d..7734ac1e0c3 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2153,7 +2153,7 @@ print_rtl_with_bb (FILE *outf, const_rtx rtx_first, int flags) if (flags & TDF_BLOCKS) { - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { rtx x; @@ -2408,7 +2408,7 @@ rtl_verify_edges (void) int err = 0; basic_block bb; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { int n_fallthru = 0, n_branch = 0, n_abnormal_call = 0, n_sibcall = 0; int n_eh = 0, n_abnormal = 0; @@ -2586,7 +2586,7 @@ rtl_verify_bb_insns (void) int err = 0; basic_block bb; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { /* Now check the header of basic block. It ought to contain optional CODE_LABEL followed @@ -2649,7 +2649,7 @@ rtl_verify_bb_pointers (void) basic_block bb; /* Check the general integrity of the basic blocks. */ - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { rtx insn; @@ -2739,7 +2739,7 @@ rtl_verify_bb_insn_chain (void) bb_info = XCNEWVEC (basic_block, max_uid); - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { rtx head = BB_HEAD (bb); rtx end = BB_END (bb); @@ -2821,7 +2821,7 @@ rtl_verify_fallthru (void) basic_block bb; int err = 0; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { edge e; diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index a8379745a14..99bc094132c 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -9613,7 +9613,7 @@ emit_predicate_relation_info (void) { basic_block bb; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { int r; rtx head = BB_HEAD (bb); @@ -9641,7 +9641,7 @@ emit_predicate_relation_info (void) relations around them. Otherwise the assembler will assume the call returns, and complain about uses of call-clobbered predicates after the call. */ - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { rtx insn = BB_HEAD (bb); diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 519892e1855..864b04e9b0f 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -11115,7 +11115,7 @@ sh_md_init_global (FILE *dump ATTRIBUTE_UNUSED, regmode_weight[1] = (short *) xcalloc (old_max_uid, sizeof (short)); r0_life_regions = 0; - FOR_EACH_BB_REVERSE (b) + FOR_EACH_BB_REVERSE_FN (b, cfun) { find_regmode_weight (b, SImode); find_regmode_weight (b, SFmode); diff --git a/gcc/config/sh/sh_optimize_sett_clrt.cc b/gcc/config/sh/sh_optimize_sett_clrt.cc index fc58bf9efdf..8d40ce1270b 100644 --- a/gcc/config/sh/sh_optimize_sett_clrt.cc +++ b/gcc/config/sh/sh_optimize_sett_clrt.cc @@ -206,7 +206,7 @@ sh_optimize_sett_clrt::execute (void) // Look for insns that set the ccreg to a constant value and see if it can // be optimized. basic_block bb; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) for (rtx next_i, i = NEXT_INSN (BB_HEAD (bb)); i != NULL_RTX && i != BB_END (bb); i = next_i) { diff --git a/gcc/dce.c b/gcc/dce.c index 31011027237..843dfc6204e 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -511,7 +511,7 @@ reset_unmarked_insns_debug_uses (void) basic_block bb; rtx insn, next; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) FOR_BB_INSNS_REVERSE_SAFE (bb, insn, next) if (DEBUG_INSN_P (insn)) { @@ -550,7 +550,7 @@ delete_unmarked_insns (void) rtx insn, next; bool must_clean = false; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) FOR_BB_INSNS_REVERSE_SAFE (bb, insn, next) if (NONDEBUG_INSN_P (insn)) { diff --git a/gcc/dominance.c b/gcc/dominance.c index 521b224b8fb..69816c1186a 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -357,7 +357,7 @@ calc_dfs_tree (struct dom_info *di, bool reverse) basic_block b; bool saw_unconnected = false; - FOR_EACH_BB_REVERSE (b) + FOR_EACH_BB_REVERSE_FN (b, cfun) { if (EDGE_COUNT (b->succs) > 0) { @@ -376,7 +376,7 @@ calc_dfs_tree (struct dom_info *di, bool reverse) if (saw_unconnected) { - FOR_EACH_BB_REVERSE (b) + FOR_EACH_BB_REVERSE_FN (b, cfun) { basic_block b2; if (di->dfs_order[b->index]) diff --git a/gcc/final.c b/gcc/final.c index f475d276b70..55269741211 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1996,7 +1996,7 @@ final (rtx first, FILE *file, int optimize_p) /* There is no cfg for a thunk. */ if (!cfun->is_thunk) - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { start_to_bb[INSN_UID (BB_HEAD (bb))] = bb; end_to_bb[INSN_UID (BB_END (bb))] = bb; diff --git a/gcc/function.c b/gcc/function.c index e00f583b743..e2d0e233e80 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6236,7 +6236,7 @@ thread_prologue_and_epilogue_insns (void) } /* Now duplicate the tails. */ if (!bitmap_empty_p (&bb_tail)) - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { basic_block copy_bb, tbb; rtx insert_point; diff --git a/gcc/gcse.c b/gcc/gcse.c index a6874abe009..fdf0a572379 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -2829,7 +2829,7 @@ compute_code_hoist_vbeinout (void) /* We scan the blocks in the reverse order to speed up the convergence. */ - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { if (bb->next_bb != EXIT_BLOCK_PTR_FOR_FN (cfun)) { diff --git a/gcc/ira.c b/gcc/ira.c index b4ae0ca7451..740387087be 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -3772,7 +3772,7 @@ update_equiv_regs (void) within the same loop (or in an inner loop), then move the register initialization just before the use, so that they are in the same basic block. */ - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { loop_depth = bb_loop_depth (bb); for (insn = BB_END (bb); @@ -4127,7 +4127,7 @@ build_insn_chain (void) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) if (TEST_HARD_REG_BIT (eliminable_regset, i)) bitmap_set_bit (elim_regset, i); - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { bitmap_iterator bi; rtx insn; diff --git a/gcc/lcm.c b/gcc/lcm.c index 0b528d94669..b5d56e05bf8 100644 --- a/gcc/lcm.c +++ b/gcc/lcm.c @@ -109,7 +109,7 @@ compute_antinout_edge (sbitmap *antloc, sbitmap *transp, sbitmap *antin, /* Put every block on the worklist; this is necessary because of the optimistic initialization of ANTIN above. */ - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { *qin++ = bb; bb->aux = bb; diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index 4e31d6812a3..4f68536d622 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -692,7 +692,7 @@ optimize_mode_switching (void) insert_insn_on_edge (mode_set, eg); } - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) if (bitmap_bit_p (del[bb->index], j)) { make_preds_opaque (bb, j); @@ -712,7 +712,7 @@ optimize_mode_switching (void) { int no_mode = num_modes[entity_map[j]]; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { struct seginfo *ptr, *next; for (ptr = bb_info[j][bb->index].seginfo; ptr; ptr = next) diff --git a/gcc/postreload.c b/gcc/postreload.c index bfa5a38f062..37bd9ff6ae3 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -1281,7 +1281,7 @@ reload_combine (void) label_live = XNEWVEC (HARD_REG_SET, n_labels); CLEAR_HARD_REG_SET (ever_live_at_start); - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { insn = BB_HEAD (bb); if (LABEL_P (insn)) diff --git a/gcc/recog.c b/gcc/recog.c index c59aa0e268e..dbd9a8a5065 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2902,7 +2902,7 @@ split_all_insns (void) bitmap_clear (blocks); changed = false; - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { rtx insn, next; bool finish = false; @@ -3556,7 +3556,7 @@ peephole2_optimize (void) search_ofs = 0; live = BITMAP_ALLOC (®_obstack); - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) { bool past_end = false; int pos; diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index da7198bc248..a37ef85d6fb 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -1050,7 +1050,7 @@ live_worklist (tree_live_info_p live) /* Visit all the blocks in reverse order and propagate live on entry values into the predecessors blocks. */ - FOR_EACH_BB_REVERSE (bb) + FOR_EACH_BB_REVERSE_FN (bb, cfun) loe_visit_block (live, bb, visited, tmp); /* Process any blocks which require further iteration. */ |