diff options
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/bb-reorder.c | 90 | ||||
-rw-r--r-- | gcc/bt-load.c | 96 | ||||
-rw-r--r-- | gcc/cfgcleanup.c | 64 | ||||
-rw-r--r-- | gcc/cfglayout.c | 25 | ||||
-rw-r--r-- | gcc/cfgloopanal.c | 64 | ||||
-rw-r--r-- | gcc/cfgloopmanip.c | 4 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 40 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 20 | ||||
-rw-r--r-- | gcc/config/frv/frv.c | 50 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 13 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 6 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 2 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 9 | ||||
-rw-r--r-- | gcc/cse.c | 4 | ||||
-rw-r--r-- | gcc/flow.c | 34 | ||||
-rw-r--r-- | gcc/ifcvt.c | 70 | ||||
-rw-r--r-- | gcc/loop-iv.c | 120 | ||||
-rw-r--r-- | gcc/loop-unroll.c | 237 | ||||
-rw-r--r-- | gcc/loop-unswitch.c | 28 | ||||
-rw-r--r-- | gcc/output.h | 2 | ||||
-rw-r--r-- | gcc/predict.c | 24 | ||||
-rw-r--r-- | gcc/profile.c | 102 | ||||
-rw-r--r-- | gcc/ra-build.c | 2 | ||||
-rw-r--r-- | gcc/ra-colorize.c | 2 | ||||
-rw-r--r-- | gcc/ra-debug.c | 14 | ||||
-rw-r--r-- | gcc/ra-rewrite.c | 4 | ||||
-rw-r--r-- | gcc/ra.c | 46 | ||||
-rw-r--r-- | gcc/regrename.c | 56 | ||||
-rw-r--r-- | gcc/reload1.c | 20 | ||||
-rw-r--r-- | gcc/toplev.c | 174 | ||||
-rw-r--r-- | gcc/tracer.c | 40 | ||||
-rw-r--r-- | gcc/value-prof.c | 34 | ||||
-rw-r--r-- | gcc/var-tracking.c | 38 | ||||
-rw-r--r-- | gcc/web.c | 20 |
35 files changed, 802 insertions, 764 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8657351619b..245f2cd6b46 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2004-02-24 Richard Henderson <rth@redhat.com> + + * toplev.c (dump_file_tbl): Rename from dump_file. + * bb-reorder.c, bt-load.c, cfgcleanup.c, cfglayout.c, cfgloopanal.c, + cfgloopmanip.c, cfgrtl.c, config/arm/arm.c, config/frv/frv.c, + config/i386/i386.c, config/ia64/ia64.c, config/mips/mips.c, + config/sh/sh.c, cse.c, flow.c, ifcvt.c, loop-iv.c, loop-unroll.c, + loop-unswitch.c, output.h, predict.c, profile.c, ra-build.c, + ra-colorize.c, ra-debug.c, ra-rewrite.c, ra.c, regrename.c, reload1.c, + toplev.c, tracer.c, value-prof.c, var-tracking.c, web.c: + s/rtl_dump_file/dump_file/g. + 2004-02-24 Aldy Hernandez <aldyh@redhat.com> * config/rs6000/spe.md (spe_fix_truncsfsi2): Delete. diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index fc50b6494d3..0f8719eb27a 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -185,8 +185,8 @@ find_traces (int *n_traces, struct trace *traces) { gcov_type count_threshold; - if (rtl_dump_file) - fprintf (rtl_dump_file, "STC - round %d\n", i + 1); + if (dump_file) + fprintf (dump_file, "STC - round %d\n", i + 1); if (max_entry_count < INT_MAX / 1000) count_threshold = max_entry_count * exec_threshold[i] / 1000; @@ -199,18 +199,18 @@ find_traces (int *n_traces, struct trace *traces) } fibheap_delete (heap); - if (rtl_dump_file) + if (dump_file) { for (i = 0; i < *n_traces; i++) { basic_block bb; - fprintf (rtl_dump_file, "Trace %d (round %d): ", i + 1, + fprintf (dump_file, "Trace %d (round %d): ", i + 1, traces[i].round + 1); for (bb = traces[i].first; bb != traces[i].last; bb = bb->rbi->next) - fprintf (rtl_dump_file, "%d [%d] ", bb->index, bb->frequency); - fprintf (rtl_dump_file, "%d [%d]\n", bb->index, bb->frequency); + fprintf (dump_file, "%d [%d] ", bb->index, bb->frequency); + fprintf (dump_file, "%d [%d]\n", bb->index, bb->frequency); } - fflush (rtl_dump_file); + fflush (dump_file); } } @@ -371,8 +371,8 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, bbd[bb->index].heap = NULL; bbd[bb->index].node = NULL; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Getting bb %d\n", bb->index); + if (dump_file) + fprintf (dump_file, "Getting bb %d\n", bb->index); /* If the BB's frequency is too low send BB to the next round. */ if (round < N_ROUNDS - 1 @@ -383,8 +383,8 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, bbd[bb->index].heap = new_heap; bbd[bb->index].node = fibheap_insert (new_heap, key, bb); - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, " Possible start point of next round: %d (key: %d)\n", bb->index, key); continue; @@ -408,8 +408,8 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, mark_bb_visited (bb, *n_traces); trace->length++; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Basic block %d was visited in trace %d\n", + if (dump_file) + fprintf (dump_file, "Basic block %d was visited in trace %d\n", bb->index, *n_traces - 1); /* Select the successor that will be placed after BB. */ @@ -466,9 +466,9 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, /* E->DEST is already in some heap. */ if (key != bbd[e->dest->index].node->key) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Changing key for bb %d from %ld to %ld.\n", e->dest->index, (long) bbd[e->dest->index].node->key, @@ -498,9 +498,9 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, bbd[e->dest->index].node = fibheap_insert (which_heap, key, e->dest); - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, " Possible start of %s round: %d (key: %ld)\n", (which_heap == new_heap) ? "next" : "this", e->dest->index, (long) key); @@ -525,9 +525,9 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, if (best_edge->dest != ENTRY_BLOCK_PTR->next_bb) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Rotating loop %d - %d\n", best_edge->dest->index, bb->index); } @@ -596,8 +596,8 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, && 2 * e->dest->frequency >= EDGE_FREQUENCY (best_edge)) { best_edge = e; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Selecting BB %d\n", + if (dump_file) + fprintf (dump_file, "Selecting BB %d\n", best_edge->dest->index); break; } @@ -626,9 +626,9 @@ find_traces_1_round (int branch_th, int exec_th, gcov_type count_th, key = bb_to_key (e->dest); if (key != bbd[e->dest->index].node->key) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Changing key for bb %d from %ld to %ld.\n", e->dest->index, (long) bbd[e->dest->index].node->key, key); @@ -661,8 +661,8 @@ copy_bb (basic_block old_bb, edge e, basic_block bb, int trace) abort (); if (e->dest->rbi->visited) abort (); - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Duplicated bb %d (created bb %d)\n", old_bb->index, new_bb->index); new_bb->rbi->visited = trace; @@ -686,9 +686,9 @@ copy_bb (basic_block old_bb, edge e, basic_block bb, int trace) } array_size = new_size; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Growing the dynamic array to %d elements.\n", array_size); } @@ -832,9 +832,9 @@ connect_traces (int n_traces, struct trace *traces) best->src->rbi->next = best->dest; t2 = bbd[best->src->index].end_of_trace; connected[t2] = true; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Connection: %d %d\n", + fprintf (dump_file, "Connection: %d %d\n", best->src->index, best->dest->index); } } @@ -873,9 +873,9 @@ connect_traces (int n_traces, struct trace *traces) if (best) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Connection: %d %d\n", + fprintf (dump_file, "Connection: %d %d\n", best->src->index, best->dest->index); } t = bbd[best->dest->index].start_of_trace; @@ -950,16 +950,16 @@ connect_traces (int n_traces, struct trace *traces) { basic_block new_bb; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Connection: %d %d ", + fprintf (dump_file, "Connection: %d %d ", traces[t].last->index, best->dest->index); if (!next_bb) - fputc ('\n', rtl_dump_file); + fputc ('\n', dump_file); else if (next_bb == EXIT_BLOCK_PTR) - fprintf (rtl_dump_file, "exit\n"); + fprintf (dump_file, "exit\n"); else - fprintf (rtl_dump_file, "%d\n", next_bb->index); + fprintf (dump_file, "%d\n", next_bb->index); } new_bb = copy_bb (best->dest, best, traces[t].last, t); @@ -980,15 +980,15 @@ connect_traces (int n_traces, struct trace *traces) } } - if (rtl_dump_file) + if (dump_file) { basic_block bb; - fprintf (rtl_dump_file, "Final order:\n"); + fprintf (dump_file, "Final order:\n"); for (bb = traces[0].first; bb; bb = bb->rbi->next) - fprintf (rtl_dump_file, "%d ", bb->index); - fprintf (rtl_dump_file, "\n"); - fflush (rtl_dump_file); + fprintf (dump_file, "%d ", bb->index); + fprintf (dump_file, "\n"); + fflush (dump_file); } FREE (connected); @@ -1035,9 +1035,9 @@ copy_bb_p (basic_block bb, int code_may_grow) if (size <= max_size) return true; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Block %d can't be copied because its size = %d.\n", bb->index, size); } @@ -1108,8 +1108,8 @@ reorder_basic_blocks (void) FREE (traces); FREE (bbd); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); cfg_layout_finalize (); diff --git a/gcc/bt-load.c b/gcc/bt-load.c index 010b78e8e0f..366e6786343 100644 --- a/gcc/bt-load.c +++ b/gcc/bt-load.c @@ -319,8 +319,8 @@ add_btr_def (fibheap_t all_btr_defs, basic_block bb, int insn_luid, rtx insn, fibheap_insert (all_btr_defs, -this->cost, this); - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Found target reg definition: sets %u { bb %d, insn %d }%s priority %d\n", dest_reg, bb->index, INSN_UID (insn), (this->group ? "" : ":not const"), this->cost); @@ -363,13 +363,13 @@ new_btr_user (basic_block bb, int insn_luid, rtx insn) user->n_reaching_defs = 0; user->first_reaching_def = -1; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Uses target reg: { bb %d, insn %d }", + fprintf (dump_file, "Uses target reg: { bb %d, insn %d }", bb->index, INSN_UID (insn)); if (user->use) - fprintf (rtl_dump_file, ": unambiguous use of reg %d\n", + fprintf (dump_file, ": unambiguous use of reg %d\n", REGNO (user->use)); } @@ -383,16 +383,16 @@ dump_hard_reg_set (HARD_REG_SET s) int reg; for (reg = 0; reg < FIRST_PSEUDO_REGISTER; reg++) if (TEST_HARD_REG_BIT (s, reg)) - fprintf (rtl_dump_file, " %d", reg); + fprintf (dump_file, " %d", reg); } /* Write the set of target regs live in block BB to the dump file. */ static void dump_btrs_live (int bb) { - fprintf (rtl_dump_file, "BB%d live:", bb); + fprintf (dump_file, "BB%d live:", bb); dump_hard_reg_set (btrs_live[bb]); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "\n"); } /* REGNO is the number of a branch target register that is being used or @@ -589,7 +589,7 @@ compute_defs_uses_and_gen (fibheap_t all_btr_defs, btr_def *def_array, SET_HARD_REG_BIT (btrs_live_at_end[i], regno); } - if (rtl_dump_file) + if (dump_file) dump_btrs_live(i); } } @@ -710,8 +710,8 @@ link_btr_uses (btr_def *def_array, btr_user *use_array, sbitmap *bb_out, /* We now know that def reaches user. */ - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Def in insn %d reaches use in insn %d\n", uid, insn_uid); @@ -725,8 +725,8 @@ link_btr_uses (btr_def *def_array, btr_user *use_array, sbitmap *bb_out, def->has_ambiguous_use = 1; def_array[user->first_reaching_def] ->has_ambiguous_use = 1; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "(use %d has multiple reaching defs)\n", insn_uid); } @@ -832,7 +832,7 @@ clear_btr_from_live_range (btr_def def) { CLEAR_HARD_REG_BIT (btrs_live[bb], def->btr); CLEAR_HARD_REG_BIT (btrs_live_at_end[bb], def->btr); - if (rtl_dump_file) + if (dump_file) dump_btrs_live (bb); } }); @@ -851,7 +851,7 @@ add_btr_to_live_range (btr_def def) { SET_HARD_REG_BIT (btrs_live[bb], def->btr); SET_HARD_REG_BIT (btrs_live_at_end[bb], def->btr); - if (rtl_dump_file) + if (dump_file) dump_btrs_live (bb); }); } @@ -888,14 +888,14 @@ augment_live_range (bitmap live_range, HARD_REG_SET *btrs_live_in_range, IOR_HARD_REG_SET (*btrs_live_in_range, btrs_live_at_end[new_block]); IOR_HARD_REG_SET (*btrs_live_in_range, btrs_live[head_bb->index]); } - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Adding end of block %d and rest of %d to live range\n", new_block, head_bb->index); - fprintf (rtl_dump_file,"Now live btrs are "); + fprintf (dump_file,"Now live btrs are "); dump_hard_reg_set (*btrs_live_in_range); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "\n"); } for (e = head_bb->pred; e; e = e->pred_next) *tos++ = e->src; @@ -913,13 +913,13 @@ augment_live_range (bitmap live_range, HARD_REG_SET *btrs_live_in_range, bitmap_set_bit (live_range, bb->index); IOR_HARD_REG_SET (*btrs_live_in_range, btrs_live[bb->index]); - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Adding block %d to live range\n", bb->index); - fprintf (rtl_dump_file,"Now live btrs are "); + fprintf (dump_file,"Now live btrs are "); dump_hard_reg_set (*btrs_live_in_range); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "\n"); } for (e = bb->pred; e != NULL; e = e->pred_next) @@ -1054,8 +1054,8 @@ combine_btr_defs (btr_def def, HARD_REG_SET *btrs_live_in_range) if (btr != -1) { /* We can combine them. */ - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Combining def in insn %d with def in insn %d\n", INSN_UID (other_def->insn), INSN_UID (def->insn)); @@ -1120,8 +1120,8 @@ move_btr_def (basic_block new_def_bb, int btr, btr_def def, bitmap live_range, btr_user user; rtx set; - if (rtl_dump_file) - fprintf(rtl_dump_file, "migrating to basic block %d, using reg %d\n", + if (dump_file) + fprintf(dump_file, "migrating to basic block %d, using reg %d\n", new_def_bb->index, btr); clear_btr_from_live_range (def); @@ -1164,8 +1164,8 @@ move_btr_def (basic_block new_def_bb, int btr, btr_def def, bitmap live_range, regs_ever_live[btr] = 1; - if (rtl_dump_file) - fprintf (rtl_dump_file, "New pt is insn %d, inserted after insn %d\n", + if (dump_file) + fprintf (dump_file, "New pt is insn %d, inserted after insn %d\n", INSN_UID (def->insn), INSN_UID (insp)); /* Delete the old target register initialization. */ @@ -1239,16 +1239,16 @@ migrate_btr_def (btr_def def, int min_cost) btr_user user; int def_latency = 1; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Attempting to migrate pt from insn %d (cost = %d, min_cost = %d) ... ", INSN_UID (def->insn), def->cost, min_cost); if (!def->group || def->has_ambiguous_use) /* These defs are not migratable. */ { - if (rtl_dump_file) - fprintf (rtl_dump_file, "it's not migratable\n"); + if (dump_file) + fprintf (dump_file, "it's not migratable\n"); return 0; } @@ -1257,8 +1257,8 @@ migrate_btr_def (btr_def def, int min_cost) no need to consider it further. */ { - if (rtl_dump_file) - fprintf (rtl_dump_file, "it's already combined with another pt\n"); + if (dump_file) + fprintf (dump_file, "it's already combined with another pt\n"); return 0; } @@ -1298,19 +1298,19 @@ migrate_btr_def (btr_def def, int min_cost) basic block TRY. */ int try_freq = basic_block_freq (try); - if (rtl_dump_file) - fprintf (rtl_dump_file, "trying block %d ...", try->index); + if (dump_file) + fprintf (dump_file, "trying block %d ...", try->index); if (try_freq < def_basic_block_freq || (try_freq == def_basic_block_freq && btr_used_near_def)) { int btr; augment_live_range (live_range, &btrs_live_in_range, def->bb, try); - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Now btrs live in range are: "); + fprintf (dump_file, "Now btrs live in range are: "); dump_hard_reg_set (btrs_live_in_range); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "\n"); } btr = choose_btr (btrs_live_in_range); if (btr != -1) @@ -1326,8 +1326,8 @@ migrate_btr_def (btr_def def, int min_cost) /* There are no free target registers available to move this far forward, so give up */ give_up = 1; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "giving up because there are no free target registers\n"); } @@ -1336,8 +1336,8 @@ migrate_btr_def (btr_def def, int min_cost) if (!def_moved) { give_up = 1; - if (rtl_dump_file) - fprintf (rtl_dump_file, "failed to move\n"); + if (dump_file) + fprintf (dump_file, "failed to move\n"); } BITMAP_XFREE (live_range); return !give_up; @@ -1352,14 +1352,14 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save) int reg; gcc_obstack_init (&migrate_btrl_obstack); - if (rtl_dump_file) + if (dump_file) { int i; for (i = 0; i < n_basic_blocks; i++) { basic_block bb = BASIC_BLOCK (i); - fprintf(rtl_dump_file, + fprintf(dump_file, "Basic block %d: count = " HOST_WIDEST_INT_PRINT_DEC " loop-depth = %d idom = %d\n", i, (HOST_WIDEST_INT) bb->count, bb->loop_depth, @@ -1391,9 +1391,9 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save) if (migrate_btr_def (def, min_cost)) { fibheap_insert (all_btr_defs, -def->cost, (void *) def); - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Putting insn %d back on queue with priority %d\n", INSN_UID (def->insn), def->cost); } diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 38a2915cc7d..f6bf6e743d6 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -159,8 +159,8 @@ try_simplify_condjump (basic_block cbranch_block) if (!invert_jump (cbranch_insn, block_label (jump_dest_block), 0)) return false; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Simplifying condjump %i around jump %i\n", + if (dump_file) + fprintf (dump_file, "Simplifying condjump %i around jump %i\n", INSN_UID (cbranch_insn), INSN_UID (BB_END (jump_block))); /* Success. Update the CFG to match. Note that after this point @@ -544,8 +544,8 @@ try_forward_edges (int mode, basic_block b) if (counter >= n_basic_blocks) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Infinite loop in BB %i.\n", + if (dump_file) + fprintf (dump_file, "Infinite loop in BB %i.\n", target->index); } else if (target == first) @@ -562,13 +562,13 @@ try_forward_edges (int mode, basic_block b) if (threaded && target != EXIT_BLOCK_PTR) { notice_new_block (redirect_edge_and_branch_force (e, target)); - if (rtl_dump_file) - fprintf (rtl_dump_file, "Conditionals threaded.\n"); + if (dump_file) + fprintf (dump_file, "Conditionals threaded.\n"); } else if (!redirect_edge_and_branch (e, target)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Forwarding edge %i->%i to %i failed.\n", b->index, e->dest->index, target->index); continue; @@ -693,8 +693,8 @@ merge_blocks_move_predecessor_nojumps (basic_block a, basic_block b) reorder_insns_nobb (BB_HEAD (a), BB_END (a), PREV_INSN (BB_HEAD (b))); a->flags |= BB_DIRTY; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Moved block %d before %d and merged.\n", + if (dump_file) + fprintf (dump_file, "Moved block %d before %d and merged.\n", a->index, b->index); /* Swap the records for the two blocks around. */ @@ -747,8 +747,8 @@ merge_blocks_move_successor_nojumps (basic_block a, basic_block b) /* Restore the real end of b. */ BB_END (b) = real_b_end; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Moved block %d after %d and merged.\n", + if (dump_file) + fprintf (dump_file, "Moved block %d after %d and merged.\n", b->index, a->index); /* Now blocks A and B are contiguous. Merge them. */ @@ -787,8 +787,8 @@ merge_blocks_move (edge e, basic_block b, basic_block c, int mode) merge_blocks (b, c); update_forwarder_flag (b); - if (rtl_dump_file) - fprintf (rtl_dump_file, "Merged %d and %d without moving.\n", + if (dump_file) + fprintf (dump_file, "Merged %d and %d without moving.\n", b_index, c_index); return b->prev_bb == ENTRY_BLOCK_PTR ? b : b->prev_bb; @@ -1201,8 +1201,8 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) outcomes. */ if (abs (b1->probability - prob2) > REG_BR_PROB_BASE / 2) { - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Outcomes of branch in bb %i and %i differs to much (%i %i)\n", bb1->index, bb2->index, b1->probability, prob2); @@ -1210,8 +1210,8 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) } } - if (rtl_dump_file && match) - fprintf (rtl_dump_file, "Conditionals in bb %i and %i match.\n", + if (dump_file && match) + fprintf (dump_file, "Conditionals in bb %i and %i match.\n", bb1->index, bb2->index); return match; @@ -1276,8 +1276,8 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) for_each_rtx (&BB_END (bb1), replace_label, &rr); match = insns_match_p (mode, BB_END (bb1), BB_END (bb2)); - if (rtl_dump_file && match) - fprintf (rtl_dump_file, + if (dump_file && match) + fprintf (dump_file, "Tablejumps in bb %i and %i match.\n", bb1->index, bb2->index); @@ -1448,14 +1448,14 @@ try_crossjump_to_edge (int mode, edge e1, edge e2) redirect_to = src2; else { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Splitting bb %i before %i insns\n", + if (dump_file) + fprintf (dump_file, "Splitting bb %i before %i insns\n", src2->index, nmatch); redirect_to = split_block (src2, PREV_INSN (newpos2))->dest; } - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Cross jumping from bb %i to bb %i; %i common insns\n", src1->index, src2->index, nmatch); @@ -1676,8 +1676,8 @@ try_optimize_cfg (int mode) changed = false; iterations++; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "\n\ntry_optimize_cfg iteration %i\n\n", iterations); @@ -1691,8 +1691,8 @@ try_optimize_cfg (int mode) while (b->pred == NULL) { c = b->prev_bb; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Deleting block %i.\n", + if (dump_file) + fprintf (dump_file, "Deleting block %i.\n", b->index); delete_basic_block (b); @@ -1733,8 +1733,8 @@ try_optimize_cfg (int mode) reorder_insns_nobb (label, label, bb_note); BB_HEAD (b) = bb_note; } - if (rtl_dump_file) - fprintf (rtl_dump_file, "Deleted label in block %i.\n", + if (dump_file) + fprintf (dump_file, "Deleted label in block %i.\n", b->index); } @@ -1749,8 +1749,8 @@ try_optimize_cfg (int mode) && (b->succ->flags & EDGE_FALLTHRU) && n_basic_blocks > 1) { - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Deleting fallthru block %i.\n", b->index); diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index 0ee6d4df9e3..41d92bbee6c 100644 --- a/gcc/cfglayout.c +++ b/gcc/cfglayout.c @@ -176,8 +176,8 @@ label_for_bb (basic_block bb) if (GET_CODE (label) != CODE_LABEL) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Emitting label for block %d\n", bb->index); + if (dump_file) + fprintf (dump_file, "Emitting label for block %d\n", bb->index); label = block_label (bb); } @@ -775,20 +775,23 @@ fixup_reorder_chain (void) /* Put basic_block_info in the new order. */ - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Reordered sequence:\n"); - for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; bb; bb = bb->rbi->next, index ++) + fprintf (dump_file, "Reordered sequence:\n"); + for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; + bb; + bb = bb->rbi->next, index++) { - fprintf (rtl_dump_file, " %i ", index); + fprintf (dump_file, " %i ", index); if (bb->rbi->original) - fprintf (rtl_dump_file, "duplicate of %i ", + fprintf (dump_file, "duplicate of %i ", bb->rbi->original->index); - else if (forwarder_block_p (bb) && GET_CODE (BB_HEAD (bb)) != CODE_LABEL) - fprintf (rtl_dump_file, "compensation "); + else if (forwarder_block_p (bb) + && GET_CODE (BB_HEAD (bb)) != CODE_LABEL) + fprintf (dump_file, "compensation "); else - fprintf (rtl_dump_file, "bb %i ", bb->index); - fprintf (rtl_dump_file, " [%i]\n", bb->frequency); + fprintf (dump_file, "bb %i ", bb->index); + fprintf (dump_file, " [%i]\n", bb->frequency); } } diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c index 0ec35ef6538..6ca4cb454c1 100644 --- a/gcc/cfgloopanal.c +++ b/gcc/cfgloopanal.c @@ -906,11 +906,11 @@ count_loop_iterations (struct loop_desc *desc, rtx init, rtx lim) } } - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "; Number of iterations: "); - print_simple_rtl (rtl_dump_file, exp); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "; Number of iterations: "); + print_simple_rtl (dump_file, exp); + fprintf (dump_file, "\n"); } return exp; @@ -946,12 +946,12 @@ test_for_iteration (struct loop_desc *desc, unsigned HOST_WIDE_INT iter) exp = simplify_gen_relational (cond, SImode, GET_MODE (desc->var), exp, desc->lim); - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "; Conditional to continue loop at " + fprintf (dump_file, "; Conditional to continue loop at " HOST_WIDE_INT_PRINT_UNSIGNED "th iteration: ", iter); - print_simple_rtl (rtl_dump_file, exp); - fprintf (rtl_dump_file, "\n"); + print_simple_rtl (dump_file, exp); + fprintf (dump_file, "\n"); } return exp; } @@ -1067,42 +1067,42 @@ simple_loop_p (struct loop *loop, struct loop_desc *desc) } desc->n_branches = n_branches; - if (rtl_dump_file && any) + if (dump_file && any) { - fprintf (rtl_dump_file, "; Simple loop %i\n", loop->num); + fprintf (dump_file, "; Simple loop %i\n", loop->num); if (desc->postincr) - fprintf (rtl_dump_file, + fprintf (dump_file, "; does postincrement after loop exit condition\n"); - fprintf (rtl_dump_file, "; Induction variable:"); - print_simple_rtl (rtl_dump_file, desc->var); - fputc ('\n', rtl_dump_file); + fprintf (dump_file, "; Induction variable:"); + print_simple_rtl (dump_file, desc->var); + fputc ('\n', dump_file); - fprintf (rtl_dump_file, "; Initial values:"); - print_simple_rtl (rtl_dump_file, desc->var_alts); - fputc ('\n', rtl_dump_file); + fprintf (dump_file, "; Initial values:"); + print_simple_rtl (dump_file, desc->var_alts); + fputc ('\n', dump_file); - fprintf (rtl_dump_file, "; Stride:"); - print_simple_rtl (rtl_dump_file, desc->stride); - fputc ('\n', rtl_dump_file); + fprintf (dump_file, "; Stride:"); + print_simple_rtl (dump_file, desc->stride); + fputc ('\n', dump_file); - fprintf (rtl_dump_file, "; Compared with:"); - print_simple_rtl (rtl_dump_file, desc->lim); - fputc ('\n', rtl_dump_file); + fprintf (dump_file, "; Compared with:"); + print_simple_rtl (dump_file, desc->lim); + fputc ('\n', dump_file); - fprintf (rtl_dump_file, "; Alternative values:"); - print_simple_rtl (rtl_dump_file, desc->lim_alts); - fputc ('\n', rtl_dump_file); + fprintf (dump_file, "; Alternative values:"); + print_simple_rtl (dump_file, desc->lim_alts); + fputc ('\n', dump_file); - fprintf (rtl_dump_file, "; Exit condition:"); + fprintf (dump_file, "; Exit condition:"); if (desc->neg) - fprintf (rtl_dump_file, "(negated)"); - fprintf (rtl_dump_file, "%s\n", GET_RTX_NAME (desc->cond)); + fprintf (dump_file, "(negated)"); + fprintf (dump_file, "%s\n", GET_RTX_NAME (desc->cond)); - fprintf (rtl_dump_file, "; Number of branches:"); - fprintf (rtl_dump_file, "%d\n", desc->n_branches); + fprintf (dump_file, "; Number of branches:"); + fprintf (dump_file, "%d\n", desc->n_branches); - fputc ('\n', rtl_dump_file); + fputc ('\n', dump_file); } free (body); diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 35444eea1c9..2dc46432aa9 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -1155,8 +1155,8 @@ create_preheader (struct loop *loop, int flags) dummy->succ->flags |= EDGE_IRREDUCIBLE_LOOP; } - if (rtl_dump_file) - fprintf (rtl_dump_file, "Created preheader block for loop %i\n", + if (dump_file) + fprintf (dump_file, "Created preheader block for loop %i\n", loop->num); return dummy; diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index cce760ff7cb..f35263f14e0 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -687,8 +687,8 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) /* See if we can create the fallthru edge. */ if (in_cfglayout || can_fallthru (src, target)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Removing jump %i.\n", INSN_UID (insn)); + if (dump_file) + fprintf (dump_file, "Removing jump %i.\n", INSN_UID (insn)); fallthru = 1; /* Selectively unlink whole insn chain. */ @@ -724,8 +724,8 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) { if (e->dest == target) return false; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Redirecting jump %i from %i to %i.\n", + if (dump_file) + fprintf (dump_file, "Redirecting jump %i from %i to %i.\n", INSN_UID (insn), e->dest->index, target->index); if (!redirect_jump (insn, block_label (target), 0)) { @@ -748,8 +748,8 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) emit_jump_insn_after (gen_jump (target_label), insn); JUMP_LABEL (BB_END (src)) = target_label; LABEL_NUSES (target_label)++; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Replacing insn %i by jump %i\n", + if (dump_file) + fprintf (dump_file, "Replacing insn %i by jump %i\n", INSN_UID (insn), INSN_UID (BB_END (src))); @@ -911,8 +911,8 @@ redirect_branch_edge (edge e, basic_block target) } } - if (rtl_dump_file) - fprintf (rtl_dump_file, "Edge %i->%i redirected to %i\n", + if (dump_file) + fprintf (dump_file, "Edge %i->%i redirected to %i\n", e->src->index, e->dest->index, target->index); if (e->dest != target) @@ -2242,8 +2242,8 @@ purge_dead_edges (basic_block bb) if (!bb->succ || !purged) return purged; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Purged edges from bb %i\n", bb->index); + if (dump_file) + fprintf (dump_file, "Purged edges from bb %i\n", bb->index); if (!optimize) return purged; @@ -2313,8 +2313,8 @@ purge_dead_edges (basic_block bb) bb->succ->probability = REG_BR_PROB_BASE; bb->succ->count = bb->count; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Purged non-fallthru edges from bb %i\n", + if (dump_file) + fprintf (dump_file, "Purged non-fallthru edges from bb %i\n", bb->index); return purged; } @@ -2389,8 +2389,8 @@ cfg_layout_redirect_edge_and_branch (edge e, basic_block dest) if (e->src == ENTRY_BLOCK_PTR && (e->flags & EDGE_FALLTHRU) && !(e->flags & EDGE_COMPLEX)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Redirecting entry edge from bb %i to %i\n", + if (dump_file) + fprintf (dump_file, "Redirecting entry edge from bb %i to %i\n", e->src->index, dest->index); redirect_edge_succ (e, dest); @@ -2408,8 +2408,8 @@ cfg_layout_redirect_edge_and_branch (edge e, basic_block dest) && label_is_jump_target_p (BB_HEAD (e->dest), BB_END (src))) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Fallthru edge unified with branch " + if (dump_file) + fprintf (dump_file, "Fallthru edge unified with branch " "%i->%i redirected to %i\n", e->src->index, e->dest->index, dest->index); e->flags &= ~EDGE_FALLTHRU; @@ -2430,8 +2430,8 @@ cfg_layout_redirect_edge_and_branch (edge e, basic_block dest) delete_insn (BB_END (src)); } redirect_edge_succ_nodup (e, dest); - if (rtl_dump_file) - fprintf (rtl_dump_file, "Fallthru edge %i->%i redirected to %i\n", + if (dump_file) + fprintf (dump_file, "Fallthru edge %i->%i redirected to %i\n", e->src->index, e->dest->index, dest->index); ret = true; @@ -2635,8 +2635,8 @@ cfg_layout_merge_blocks (basic_block a, basic_block b) b->rbi->footer = NULL; } - if (rtl_dump_file) - fprintf (rtl_dump_file, "Merged blocks %d and %d.\n", + if (dump_file) + fprintf (dump_file, "Merged blocks %d and %d.\n", a->index, b->index); } diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index c774f19b757..a2ab3d65f82 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -7103,8 +7103,8 @@ dump_minipool (rtx scan) break; } - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, ";; Emitting minipool after insn %u; address %ld; align %d (bytes)\n", INSN_UID (scan), (unsigned long) minipool_barrier->address, align64 ? 8 : 4); @@ -7116,14 +7116,14 @@ dump_minipool (rtx scan) { if (mp->refcount > 0) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, ";; Offset %u, min %ld, max %ld ", (unsigned) mp->offset, (unsigned long) mp->min_address, (unsigned long) mp->max_address); - arm_print_value (rtl_dump_file, mp->value); - fputc ('\n', rtl_dump_file); + arm_print_value (dump_file, mp->value); + fputc ('\n', dump_file); } switch (mp->fix_size) @@ -7344,15 +7344,15 @@ push_minipool_fix (rtx insn, HOST_WIDE_INT address, rtx *loc, if (TARGET_REALLY_IWMMXT && fix->fix_size == 8) fix->forwards -= 4; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, ";; %smode fixup for i%d; addr %lu, range (%ld,%ld): ", GET_MODE_NAME (mode), INSN_UID (insn), (unsigned long) address, -1 * (long)fix->backwards, (long)fix->forwards); - arm_print_value (rtl_dump_file, fix->value); - fprintf (rtl_dump_file, "\n"); + arm_print_value (dump_file, fix->value); + fprintf (dump_file, "\n"); } /* Add it to the chain of fixes. */ diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 92daeaa2f6d..1feb2793f44 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -6773,8 +6773,8 @@ frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false) rtx insn = BB_HEAD (bb[j]); int regno; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Scanning %s block %d, start %d, end %d\n", + if (dump_file) + fprintf (dump_file, "Scanning %s block %d, start %d, end %d\n", (bb[j] == else_bb) ? "else" : ((bb[j] == then_bb) ? "then" : "test"), (int) bb[j]->index, (int) INSN_UID (BB_HEAD (bb[j])), @@ -6860,36 +6860,36 @@ frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false) CLEAR_HARD_REG_BIT (tmp_reg->regs, j); } - if (rtl_dump_file) + if (dump_file) { int num_gprs = 0; - fprintf (rtl_dump_file, "Available GPRs: "); + fprintf (dump_file, "Available GPRs: "); for (j = GPR_FIRST; j <= GPR_LAST; j++) if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) { - fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); + fprintf (dump_file, " %d [%s]", j, reg_names[j]); if (++num_gprs > GPR_TEMP_NUM+2) break; } - fprintf (rtl_dump_file, "%s\nAvailable CRs: ", + fprintf (dump_file, "%s\nAvailable CRs: ", (num_gprs > GPR_TEMP_NUM+2) ? " ..." : ""); for (j = CR_FIRST; j <= CR_LAST; j++) if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) - fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); + fprintf (dump_file, " %d [%s]", j, reg_names[j]); - fputs ("\n", rtl_dump_file); + fputs ("\n", dump_file); if (ce_info->pass > 1) { - fprintf (rtl_dump_file, "Modifiable CCs: "); + fprintf (dump_file, "Modifiable CCs: "); for (j = CC_FIRST; j <= CC_LAST; j++) if (TEST_HARD_REG_BIT (tmp_reg->regs, j)) - fprintf (rtl_dump_file, " %d [%s]", j, reg_names[j]); + fprintf (dump_file, " %d [%s]", j, reg_names[j]); - fprintf (rtl_dump_file, "\n%d nested COND_EXEC statements\n", + fprintf (dump_file, "\n%d nested COND_EXEC statements\n", frv_ifcvt.num_nested_cond_exec); } } @@ -6946,14 +6946,14 @@ frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false) if (! cr) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Could not allocate a CR temporary register\n"); + if (dump_file) + fprintf (dump_file, "Could not allocate a CR temporary register\n"); goto fail; } - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Will use %s for conditional execution, %s for nested comparisons\n", reg_names[ REGNO (cr)], (nested_cc) ? reg_names[ REGNO (nested_cc) ] : "<none>"); @@ -6991,8 +6991,8 @@ frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false) fail: *p_true = NULL_RTX; *p_false = NULL_RTX; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Disabling this conditional execution.\n"); + if (dump_file) + fprintf (dump_file, "Disabling this conditional execution.\n"); return; } @@ -7169,8 +7169,8 @@ frv_ifcvt_load_value (rtx value, rtx insn ATTRIBUTE_UNUSED) /* Have we exhausted the number of registers available? */ if (num_alloc >= GPR_TEMP_NUM) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Too many temporary registers allocated\n"); + if (dump_file) + fprintf (dump_file, "Too many temporary registers allocated\n"); return NULL_RTX; } @@ -7179,8 +7179,8 @@ frv_ifcvt_load_value (rtx value, rtx insn ATTRIBUTE_UNUSED) reg = frv_alloc_temp_reg (&frv_ifcvt.tmp_reg, GPR_REGS, SImode, TRUE, TRUE); if (! reg) { - if (rtl_dump_file) - fputs ("Could not find a scratch register\n", rtl_dump_file); + if (dump_file) + fputs ("Could not find a scratch register\n", dump_file); return NULL_RTX; } @@ -7188,18 +7188,18 @@ frv_ifcvt_load_value (rtx value, rtx insn ATTRIBUTE_UNUSED) frv_ifcvt.cur_scratch_regs++; frv_ifcvt.scratch_regs[num_alloc] = gen_rtx_SET (VOIDmode, reg, value); - if (rtl_dump_file) + if (dump_file) { if (GET_CODE (value) == CONST_INT) - fprintf (rtl_dump_file, "Register %s will hold %ld\n", + fprintf (dump_file, "Register %s will hold %ld\n", reg_names[ REGNO (reg)], (long)INTVAL (value)); else if (GET_CODE (value) == REG && REGNO (value) == LR_REGNO) - fprintf (rtl_dump_file, "Register %s will hold LR\n", + fprintf (dump_file, "Register %s will hold LR\n", reg_names[ REGNO (reg)]); else - fprintf (rtl_dump_file, "Register %s will hold a saved value\n", + fprintf (dump_file, "Register %s will hold a saved value\n", reg_names[ REGNO (reg)]); } diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 02f62f4e74e..b7a0a7156cd 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -15738,8 +15738,8 @@ ix86_avoid_jump_misspredicts (void) { nbytes += min_insn_size (insn); - if (rtl_dump_file) - fprintf(rtl_dump_file, "Insn %i estimated to %i bytes\n", + if (dump_file) + fprintf(dump_file, "Insn %i estimated to %i bytes\n", INSN_UID (insn), min_insn_size (insn)); if ((GET_CODE (insn) == JUMP_INSN && GET_CODE (PATTERN (insn)) != ADDR_VEC @@ -15763,16 +15763,17 @@ ix86_avoid_jump_misspredicts (void) } if (njumps < 0) abort (); - if (rtl_dump_file) - fprintf(rtl_dump_file, "Interval %i to %i has %i bytes\n", + if (dump_file) + fprintf (dump_file, "Interval %i to %i has %i bytes\n", INSN_UID (start), INSN_UID (insn), nbytes); if (njumps == 3 && isjump && nbytes < 16) { int padsize = 15 - nbytes + min_insn_size (insn); - if (rtl_dump_file) - fprintf (rtl_dump_file, "Padding insn %i by %i bytes!\n", INSN_UID (insn), padsize); + if (dump_file) + fprintf (dump_file, "Padding insn %i by %i bytes!\n", + INSN_UID (insn), padsize); emit_insn_before (gen_align (GEN_INT (padsize)), insn); } } diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index b790819ca35..057e985fe45 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -7607,7 +7607,7 @@ ia64_reorg (void) _1mfb_ = get_cpu_unit_code ("1b_1mfb."); _1mlx_ = get_cpu_unit_code ("1b_1mlx."); } - schedule_ebbs (rtl_dump_file); + schedule_ebbs (dump_file); finish_bundle_states (); if (ia64_tune == PROCESSOR_ITANIUM) { @@ -7615,13 +7615,13 @@ ia64_reorg (void) free (clocks); } free (stops_p); - emit_insn_group_barriers (rtl_dump_file); + emit_insn_group_barriers (dump_file); ia64_final_schedule = 0; timevar_pop (TV_SCHED2); } else - emit_all_insn_group_barriers (rtl_dump_file); + emit_all_insn_group_barriers (dump_file); /* A call must not be the last instruction in a function, so that the return address is still within the function, so that unwinding works diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index aba66399611..852a8c8ba39 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -8750,7 +8750,7 @@ mips_reorg (void) else if (TARGET_EXPLICIT_RELOCS) { if (mips_flag_delayed_branch) - dbr_schedule (get_insns (), rtl_dump_file); + dbr_schedule (get_insns (), dump_file); mips_avoid_hazards (); } } diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index dbb463d9915..78e5118a820 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -9480,19 +9480,18 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, if (optimize > 0 && flag_schedule_insns_after_reload) { - - find_basic_blocks (insns, max_reg_num (), rtl_dump_file); - life_analysis (insns, rtl_dump_file, PROP_FINAL); + find_basic_blocks (insns, max_reg_num (), dump_file); + life_analysis (insns, dump_file, PROP_FINAL); split_all_insns (1); - schedule_insns (rtl_dump_file); + schedule_insns (dump_file); } sh_reorg (); if (optimize > 0 && flag_delayed_branch) - dbr_schedule (insns, rtl_dump_file); + dbr_schedule (insns, dump_file); shorten_branches (insns); final_start_function (insns, file, 1); final (insns, file, 1, 0); diff --git a/gcc/cse.c b/gcc/cse.c index 4262f4d3275..2d560e0d408 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -7672,8 +7672,8 @@ delete_trivially_dead_insns (rtx insns, int nreg) } while (ndead != nlastdead); - if (rtl_dump_file && ndead) - fprintf (rtl_dump_file, "Deleted %i trivially dead insns; %i iterations\n", + if (dump_file && ndead) + fprintf (dump_file, "Deleted %i trivially dead insns; %i iterations\n", ndead, niterations); /* Clean up. */ free (counts); diff --git a/gcc/flow.c b/gcc/flow.c index 736e5e61bcb..acf375a83cd 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -536,10 +536,10 @@ verify_wide_reg (int regno, basic_block bb) head = NEXT_INSN (head); } - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Register %d died unexpectedly.\n", regno); - dump_bb (bb, rtl_dump_file, 0); + fprintf (dump_file, "Register %d died unexpectedly.\n", regno); + dump_bb (bb, dump_file, 0); } abort (); } @@ -556,14 +556,14 @@ verify_local_live_at_start (regset new_live_at_start, basic_block bb) registers. The regsets should exactly match. */ if (! REG_SET_EQUAL_P (new_live_at_start, bb->global_live_at_start)) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "live_at_start mismatch in bb %d, aborting\nNew:\n", bb->index); - debug_bitmap_file (rtl_dump_file, new_live_at_start); - fputs ("Old:\n", rtl_dump_file); - dump_bb (bb, rtl_dump_file, 0); + debug_bitmap_file (dump_file, new_live_at_start); + fputs ("Old:\n", dump_file); + dump_bb (bb, dump_file, 0); } abort (); } @@ -580,11 +580,11 @@ verify_local_live_at_start (regset new_live_at_start, basic_block bb) /* No registers should die. */ if (REGNO_REG_SET_P (bb->global_live_at_start, i)) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, + fprintf (dump_file, "Register %d died unexpectedly.\n", i); - dump_bb (bb, rtl_dump_file, 0); + dump_bb (bb, dump_file, 0); } abort (); } @@ -766,8 +766,8 @@ update_life_info (sbitmap blocks, enum update_life_extent extent, int prop_flags } timevar_pop ((extent == UPDATE_LIFE_LOCAL || blocks) ? TV_LIFE_UPDATE : TV_LIFE); - if (ndead && rtl_dump_file) - fprintf (rtl_dump_file, "deleted %i dead insns\n", ndead); + if (ndead && dump_file) + fprintf (dump_file, "deleted %i dead insns\n", ndead); return ndead; } @@ -871,8 +871,8 @@ delete_noop_moves (rtx f ATTRIBUTE_UNUSED) } } } - if (nnoops && rtl_dump_file) - fprintf (rtl_dump_file, "deleted %i noop moves", nnoops); + if (nnoops && dump_file) + fprintf (dump_file, "deleted %i noop moves", nnoops); return nnoops; } @@ -893,8 +893,8 @@ delete_dead_jumptables (void) && (GET_CODE (PATTERN (next)) == ADDR_VEC || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Dead jumptable %i removed\n", INSN_UID (insn)); + if (dump_file) + fprintf (dump_file, "Dead jumptable %i removed\n", INSN_UID (insn)); delete_insn (NEXT_INSN (insn)); delete_insn (insn); next = NEXT_INSN (next); diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index def79ab6ce9..976098f4326 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -566,8 +566,8 @@ cond_exec_process_if_block (ce_if_block_t * ce_info, #endif /* Conversion succeeded. */ - if (rtl_dump_file) - fprintf (rtl_dump_file, "%d insn%s converted to conditional execution.\n", + if (dump_file) + fprintf (dump_file, "%d insn%s converted to conditional execution.\n", n_insns, (n_insns == 1) ? " was" : "s were"); /* Merge the blocks! */ @@ -2273,8 +2273,8 @@ find_if_header (basic_block test_bb, int pass) return NULL; success: - if (rtl_dump_file) - fprintf (rtl_dump_file, "Conversion succeeded on pass %d.\n", pass); + if (dump_file) + fprintf (dump_file, "Conversion succeeded on pass %d.\n", pass); return ce_info.test_bb; } @@ -2514,23 +2514,29 @@ find_if_block (struct ce_if_block * ce_info) num_possible_if_blocks++; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "\nIF-THEN%s block found, pass %d, start block %d [insn %d], then %d [%d]", + fprintf (dump_file, + "\nIF-THEN%s block found, pass %d, start block %d " + "[insn %d], then %d [%d]", (else_bb) ? "-ELSE" : "", ce_info->pass, - test_bb->index, (BB_HEAD (test_bb)) ? (int)INSN_UID (BB_HEAD (test_bb)) : -1, - then_bb->index, (BB_HEAD (then_bb)) ? (int)INSN_UID (BB_HEAD (then_bb)) : -1); + test_bb->index, + BB_HEAD (test_bb) ? (int)INSN_UID (BB_HEAD (test_bb)) : -1, + then_bb->index, + BB_HEAD (then_bb) ? (int)INSN_UID (BB_HEAD (then_bb)) : -1); if (else_bb) - fprintf (rtl_dump_file, ", else %d [%d]", - else_bb->index, (BB_HEAD (else_bb)) ? (int)INSN_UID (BB_HEAD (else_bb)) : -1); + fprintf (dump_file, ", else %d [%d]", + else_bb->index, + BB_HEAD (else_bb) ? (int)INSN_UID (BB_HEAD (else_bb)) : -1); - fprintf (rtl_dump_file, ", join %d [%d]", - join_bb->index, (BB_HEAD (join_bb)) ? (int)INSN_UID (BB_HEAD (join_bb)) : -1); + fprintf (dump_file, ", join %d [%d]", + join_bb->index, + BB_HEAD (join_bb) ? (int)INSN_UID (BB_HEAD (join_bb)) : -1); if (ce_info->num_multiple_test_blocks > 0) - fprintf (rtl_dump_file, ", %d %s block%s last test %d [%d]", + fprintf (dump_file, ", %d %s block%s last test %d [%d]", ce_info->num_multiple_test_blocks, (ce_info->and_and_p) ? "&&" : "||", (ce_info->num_multiple_test_blocks == 1) ? "" : "s", @@ -2539,7 +2545,7 @@ find_if_block (struct ce_if_block * ce_info) ? (int)INSN_UID (BB_HEAD (ce_info->last_test_bb)) : -1)); - fputc ('\n', rtl_dump_file); + fputc ('\n', dump_file); } /* Make sure IF, THEN, and ELSE, blocks are adjacent. Actually, we get the @@ -2590,9 +2596,9 @@ find_cond_trap (basic_block test_bb, edge then_edge, edge else_edge) else return FALSE; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "\nTRAP-IF block found, start %d, trap %d\n", + fprintf (dump_file, "\nTRAP-IF block found, start %d, trap %d\n", test_bb->index, trap_bb->index); } @@ -2794,8 +2800,8 @@ find_if_case_1 (basic_block test_bb, edge then_edge, edge else_edge) return FALSE; num_possible_if_blocks++; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "\nIF-CASE-1 found, start %d, then %d\n", test_bb->index, then_bb->index); @@ -2873,8 +2879,8 @@ find_if_case_2 (basic_block test_bb, edge then_edge, edge else_edge) return FALSE; num_possible_if_blocks++; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "\nIF-CASE-2 found, start %d, else %d\n", test_bb->index, else_bb->index); @@ -3213,8 +3219,8 @@ if_convert (int x_life_data_ok) pass++; #ifdef IFCVT_MULTIPLE_DUMPS - if (rtl_dump_file && pass > 1) - fprintf (rtl_dump_file, "\n\n========== Pass %d ==========\n", pass); + if (dump_file && pass > 1) + fprintf (dump_file, "\n\n========== Pass %d ==========\n", pass); #endif FOR_EACH_BB (bb) @@ -3225,21 +3231,21 @@ if_convert (int x_life_data_ok) } #ifdef IFCVT_MULTIPLE_DUMPS - if (rtl_dump_file && cond_exec_changed_p) - print_rtl_with_bb (rtl_dump_file, get_insns ()); + if (dump_file && cond_exec_changed_p) + print_rtl_with_bb (dump_file, get_insns ()); #endif } while (cond_exec_changed_p); #ifdef IFCVT_MULTIPLE_DUMPS - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n\n========== no more changes\n"); + if (dump_file) + fprintf (dump_file, "\n\n========== no more changes\n"); #endif free_dominance_info (CDI_POST_DOMINATORS); - if (rtl_dump_file) - fflush (rtl_dump_file); + if (dump_file) + fflush (dump_file); clear_aux_for_blocks (); @@ -3258,15 +3264,15 @@ if_convert (int x_life_data_ok) } /* Write the final stats. */ - if (rtl_dump_file && num_possible_if_blocks > 0) + if (dump_file && num_possible_if_blocks > 0) { - fprintf (rtl_dump_file, + fprintf (dump_file, "\n%d possible IF blocks searched.\n", num_possible_if_blocks); - fprintf (rtl_dump_file, + fprintf (dump_file, "%d IF blocks converted.\n", num_updated_if_blocks); - fprintf (rtl_dump_file, + fprintf (dump_file, "%d true changes made.\n\n\n", num_true_changes); } diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 1d4e715bab9..277c1eaa09a 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -788,11 +788,11 @@ iv_analyze_biv (rtx def, struct rtx_iv *iv) enum machine_mode inner_mode, outer_mode; enum rtx_code extend; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Analysing "); - print_rtl (rtl_dump_file, def); - fprintf (rtl_dump_file, " for bivness.\n"); + fprintf (dump_file, "Analysing "); + print_rtl (dump_file, def); + fprintf (dump_file, " for bivness.\n"); } if (!REG_P (def)) @@ -806,15 +806,15 @@ iv_analyze_biv (rtx def, struct rtx_iv *iv) regno = REGNO (def); if (last_def[regno] == const0_rtx) { - if (rtl_dump_file) - fprintf (rtl_dump_file, " not simple.\n"); + if (dump_file) + fprintf (dump_file, " not simple.\n"); return false; } if (last_def[regno] && bivs[regno].analysed) { - if (rtl_dump_file) - fprintf (rtl_dump_file, " already analysed.\n"); + if (dump_file) + fprintf (dump_file, " already analysed.\n"); *iv = bivs[regno]; return iv->base != NULL_RTX; @@ -849,12 +849,12 @@ iv_analyze_biv (rtx def, struct rtx_iv *iv) iv->delta = outer_step; iv->first_special = inner_mode != outer_mode; -end: - if (rtl_dump_file) + end: + if (dump_file) { - fprintf (rtl_dump_file, " "); - dump_iv_info (rtl_dump_file, iv); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, " "); + dump_iv_info (dump_file, iv); + fprintf (dump_file, "\n"); } bivs[regno] = *iv; @@ -871,12 +871,12 @@ iv_analyze_op (rtx insn, rtx op, struct rtx_iv *iv) unsigned regno; bool inv = CONSTANT_P (op); - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Analysing operand "); - print_rtl (rtl_dump_file, op); - fprintf (rtl_dump_file, " of insn "); - print_rtl_single (rtl_dump_file, insn); + fprintf (dump_file, "Analysing operand "); + print_rtl (dump_file, op); + fprintf (dump_file, " of insn "); + print_rtl_single (dump_file, insn); } if (GET_CODE (op) == SUBREG) @@ -897,8 +897,8 @@ iv_analyze_op (rtx insn, rtx op, struct rtx_iv *iv) inv = true; else if (last_def[regno] == const0_rtx) { - if (rtl_dump_file) - fprintf (rtl_dump_file, " not simple.\n"); + if (dump_file) + fprintf (dump_file, " not simple.\n"); return false; } } @@ -907,11 +907,11 @@ iv_analyze_op (rtx insn, rtx op, struct rtx_iv *iv) { iv_constant (iv, op, VOIDmode); - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, " "); - dump_iv_info (rtl_dump_file, iv); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, " "); + dump_iv_info (dump_file, iv); + fprintf (dump_file, "\n"); } return true; } @@ -919,8 +919,8 @@ iv_analyze_op (rtx insn, rtx op, struct rtx_iv *iv) def_insn = iv_get_reaching_def (insn, op); if (def_insn == const0_rtx) { - if (rtl_dump_file) - fprintf (rtl_dump_file, " not simple.\n"); + if (dump_file) + fprintf (dump_file, " not simple.\n"); return false; } @@ -956,19 +956,19 @@ iv_analyze (rtx insn, rtx def, struct rtx_iv *iv) if (!insn) return iv_analyze_biv (def, iv); - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Analysing def of "); - print_rtl (rtl_dump_file, def); - fprintf (rtl_dump_file, " in insn "); - print_rtl_single (rtl_dump_file, insn); + fprintf (dump_file, "Analysing def of "); + print_rtl (dump_file, def); + fprintf (dump_file, " in insn "); + print_rtl_single (dump_file, insn); } uid = INSN_UID (insn); if (insn_info[uid].iv.analysed) { - if (rtl_dump_file) - fprintf (rtl_dump_file, " already analysed.\n"); + if (dump_file) + fprintf (dump_file, " already analysed.\n"); *iv = insn_info[uid].iv; return iv->base != NULL_RTX; } @@ -1088,18 +1088,18 @@ iv_analyze (rtx insn, rtx def, struct rtx_iv *iv) *iv = iv0; -end: + end: iv->analysed = true; insn_info[uid].iv = *iv; - if (rtl_dump_file) + if (dump_file) { - print_rtl (rtl_dump_file, def); - fprintf (rtl_dump_file, " in insn "); - print_rtl_single (rtl_dump_file, insn); - fprintf (rtl_dump_file, " is "); - dump_iv_info (rtl_dump_file, iv); - fprintf (rtl_dump_file, "\n"); + print_rtl (dump_file, def); + fprintf (dump_file, " in insn "); + print_rtl_single (dump_file, insn); + fprintf (dump_file, " is "); + dump_iv_info (dump_file, iv); + fprintf (dump_file, "\n"); } return iv->base != NULL_RTX; @@ -2389,43 +2389,43 @@ find_simple_exit (struct loop *loop, struct niter_desc *desc) } } - if (rtl_dump_file) + if (dump_file) { if (desc->simple_p) { - fprintf (rtl_dump_file, "Loop %d is simple:\n", loop->num); - fprintf (rtl_dump_file, " simple exit %d -> %d\n", + fprintf (dump_file, "Loop %d is simple:\n", loop->num); + fprintf (dump_file, " simple exit %d -> %d\n", desc->out_edge->src->index, desc->out_edge->dest->index); if (desc->assumptions) { - fprintf (rtl_dump_file, " assumptions: "); - print_rtl (rtl_dump_file, desc->assumptions); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, " assumptions: "); + print_rtl (dump_file, desc->assumptions); + fprintf (dump_file, "\n"); } if (desc->noloop_assumptions) { - fprintf (rtl_dump_file, " does not roll if: "); - print_rtl (rtl_dump_file, desc->noloop_assumptions); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, " does not roll if: "); + print_rtl (dump_file, desc->noloop_assumptions); + fprintf (dump_file, "\n"); } if (desc->infinite) { - fprintf (rtl_dump_file, " infinite if: "); - print_rtl (rtl_dump_file, desc->infinite); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, " infinite if: "); + print_rtl (dump_file, desc->infinite); + fprintf (dump_file, "\n"); } - fprintf (rtl_dump_file, " number of iterations: "); - print_rtl (rtl_dump_file, desc->niter_expr); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, " number of iterations: "); + print_rtl (dump_file, desc->niter_expr); + fprintf (dump_file, "\n"); - fprintf (rtl_dump_file, " upper bound: "); - fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, desc->niter_max); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, " upper bound: "); + fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, desc->niter_max); + fprintf (dump_file, "\n"); } else - fprintf (rtl_dump_file, "Loop %d is not simple.\n", loop->num); + fprintf (dump_file, "Loop %d is not simple.\n", loop->num); } free (body); diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index 45abba3df56..74957a76ee4 100644 --- a/gcc/loop-unroll.c +++ b/gcc/loop-unroll.c @@ -192,8 +192,9 @@ peel_loops_completely (struct loops *loops, int flags) loop->lpt_decision.decision = LPT_NONE; - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n;; *** Considering loop %d for complete peeling ***\n", + if (dump_file) + fprintf (dump_file, + "\n;; *** Considering loop %d for complete peeling ***\n", loop->num); loop->ninsns = num_loop_insns (loop); @@ -237,14 +238,14 @@ decide_unrolling_and_peeling (struct loops *loops, int flags) loop->lpt_decision.decision = LPT_NONE; - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n;; *** Considering loop %d ***\n", loop->num); + if (dump_file) + fprintf (dump_file, "\n;; *** Considering loop %d ***\n", loop->num); /* Do not peel cold areas. */ if (!maybe_hot_bb_p (loop->header)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, cold area\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, cold area\n"); loop = next; continue; } @@ -252,8 +253,8 @@ decide_unrolling_and_peeling (struct loops *loops, int flags) /* Can the loop be manipulated? */ if (!can_duplicate_loop_p (loop)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, ";; Not considering loop, cannot duplicate\n"); loop = next; continue; @@ -262,8 +263,8 @@ decide_unrolling_and_peeling (struct loops *loops, int flags) /* Skip non-innermost loops. */ if (loop->inner) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, is not innermost\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, is not innermost\n"); loop = next; continue; } @@ -293,14 +294,14 @@ decide_peel_once_rolling (struct loop *loop, int flags ATTRIBUTE_UNUSED) { struct niter_desc *desc; - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n;; Considering peeling once rolling loop\n"); + if (dump_file) + fprintf (dump_file, "\n;; Considering peeling once rolling loop\n"); /* Is the loop small enough? */ if ((unsigned) PARAM_VALUE (PARAM_MAX_ONCE_PEELED_INSNS) < loop->ninsns) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, is too big\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, is too big\n"); return; } @@ -313,14 +314,15 @@ decide_peel_once_rolling (struct loop *loop, int flags ATTRIBUTE_UNUSED) || !desc->const_iter || desc->niter != 0) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Unable to prove that the loop rolls exactly once\n"); + if (dump_file) + fprintf (dump_file, + ";; Unable to prove that the loop rolls exactly once\n"); return; } /* Success. */ - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Decided to peel exactly once rolling loop\n"); + if (dump_file) + fprintf (dump_file, ";; Decided to peel exactly once rolling loop\n"); loop->lpt_decision.decision = LPT_PEEL_COMPLETELY; } @@ -331,30 +333,30 @@ decide_peel_completely (struct loop *loop, int flags ATTRIBUTE_UNUSED) unsigned npeel; struct niter_desc *desc; - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n;; Considering peeling completely\n"); + if (dump_file) + fprintf (dump_file, "\n;; Considering peeling completely\n"); /* Skip non-innermost loops. */ if (loop->inner) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, is not innermost\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, is not innermost\n"); return; } /* Do not peel cold areas. */ if (!maybe_hot_bb_p (loop->header)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, cold area\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, cold area\n"); return; } /* Can the loop be manipulated? */ if (!can_duplicate_loop_p (loop)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, ";; Not considering loop, cannot duplicate\n"); return; } @@ -367,8 +369,8 @@ decide_peel_completely (struct loop *loop, int flags ATTRIBUTE_UNUSED) /* Is the loop small enough? */ if (!npeel) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, is too big\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, is too big\n"); return; } @@ -380,25 +382,27 @@ decide_peel_completely (struct loop *loop, int flags ATTRIBUTE_UNUSED) || desc->assumptions || !desc->const_iter) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Unable to prove that the loop iterates constant times\n"); + if (dump_file) + fprintf (dump_file, + ";; Unable to prove that the loop iterates constant times\n"); return; } if (desc->niter > npeel - 1) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, ";; Not peeling loop completely, rolls too much ("); - fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, desc->niter); - fprintf (rtl_dump_file, " iterations > %d [maximum peelings])\n", npeel); + fprintf (dump_file, + ";; Not peeling loop completely, rolls too much ("); + fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, desc->niter); + fprintf (dump_file, " iterations > %d [maximum peelings])\n", npeel); } return; } /* Success. */ - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Decided to peel loop completely\n"); + if (dump_file) + fprintf (dump_file, ";; Decided to peel loop completely\n"); loop->lpt_decision.decision = LPT_PEEL_COMPLETELY; } @@ -459,11 +463,12 @@ peel_loop_completely (struct loops *loops, struct loop *loop) the loop. */ remove_path (loops, ei); - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Peeled loop completely, %d times\n", (int) npeel); + if (dump_file) + fprintf (dump_file, ";; Peeled loop completely, %d times\n", (int) npeel); } -/* Decide whether to unroll LOOP iterating constant number of times and how much. */ +/* Decide whether to unroll LOOP iterating constant number of times + and how much. */ static void decide_unroll_constant_iterations (struct loop *loop, int flags) @@ -477,14 +482,16 @@ decide_unroll_constant_iterations (struct loop *loop, int flags) return; } - if (rtl_dump_file) - fprintf (rtl_dump_file, - "\n;; Considering unrolling loop with constant number of iterations\n"); + if (dump_file) + fprintf (dump_file, + "\n;; Considering unrolling loop with constant " + "number of iterations\n"); /* nunroll = total number of copies of the original loop body in unrolled loop (i.e. if it is 2, we have to duplicate loop body once. */ nunroll = PARAM_VALUE (PARAM_MAX_UNROLLED_INSNS) / loop->ninsns; - nunroll_by_av = PARAM_VALUE (PARAM_MAX_AVERAGE_UNROLLED_INSNS) / loop->av_ninsns; + nunroll_by_av + = PARAM_VALUE (PARAM_MAX_AVERAGE_UNROLLED_INSNS) / loop->av_ninsns; if (nunroll > nunroll_by_av) nunroll = nunroll_by_av; if (nunroll > (unsigned) PARAM_VALUE (PARAM_MAX_UNROLL_TIMES)) @@ -493,8 +500,8 @@ decide_unroll_constant_iterations (struct loop *loop, int flags) /* Skip big loops. */ if (nunroll <= 1) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, is too big\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, is too big\n"); return; } @@ -504,16 +511,17 @@ decide_unroll_constant_iterations (struct loop *loop, int flags) /* Check number of iterations. */ if (!desc->simple_p || !desc->const_iter || desc->assumptions) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Unable to prove that the loop iterates constant times\n"); + if (dump_file) + fprintf (dump_file, + ";; Unable to prove that the loop iterates constant times\n"); return; } /* Check whether the loop rolls enough to consider. */ if (desc->niter < 2 * nunroll) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unrolling loop, doesn't roll\n"); + if (dump_file) + fprintf (dump_file, ";; Not unrolling loop, doesn't roll\n"); return; } @@ -546,15 +554,15 @@ decide_unroll_constant_iterations (struct loop *loop, int flags) } } - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; max_unroll %d (%d copies, initial %d).\n", + if (dump_file) + fprintf (dump_file, ";; max_unroll %d (%d copies, initial %d).\n", best_unroll + 1, best_copies, nunroll); loop->lpt_decision.decision = LPT_UNROLL_CONSTANT; loop->lpt_decision.times = best_unroll; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, ";; Decided to unroll the constant times rolling loop, %d times.\n", loop->lpt_decision.times); } @@ -609,8 +617,8 @@ unroll_loop_constant_iterations (struct loops *loops, struct loop *loop) in the first copy, so that the loops that start with test of exit condition have continuous body after unrolling. */ - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Condition on beginning of loop.\n"); + if (dump_file) + fprintf (dump_file, ";; Condition on beginning of loop.\n"); /* Peel exit_mod iterations. */ RESET_BIT (wont_exit, 0); @@ -638,8 +646,8 @@ unroll_loop_constant_iterations (struct loops *loops, struct loop *loop) /* Leave exit test in last copy, for the same reason as above if the loop tests the condition at the end of loop body. */ - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Condition on end of loop.\n"); + if (dump_file) + fprintf (dump_file, ";; Condition on end of loop.\n"); /* We know that niter >= max_unroll + 2; so we do not need to care of case when we would exit before reaching the loop. So just peel @@ -703,8 +711,10 @@ unroll_loop_constant_iterations (struct loops *loops, struct loop *loop) remove_path (loops, remove_edges[i]); free (remove_edges); - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Unrolled loop %d times, constant # of iterations %i insns\n",max_unroll, num_loop_insns (loop)); + if (dump_file) + fprintf (dump_file, + ";; Unrolled loop %d times, constant # of iterations %i insns\n", + max_unroll, num_loop_insns (loop)); } /* Decide whether to unroll LOOP iterating runtime computable number of times @@ -721,9 +731,10 @@ decide_unroll_runtime_iterations (struct loop *loop, int flags) return; } - if (rtl_dump_file) - fprintf (rtl_dump_file, - "\n;; Considering unrolling loop with runtime computable number of iterations\n"); + if (dump_file) + fprintf (dump_file, + "\n;; Considering unrolling loop with runtime " + "computable number of iterations\n"); /* nunroll = total number of copies of the original loop body in unrolled loop (i.e. if it is 2, we have to duplicate loop body once. */ @@ -737,8 +748,8 @@ decide_unroll_runtime_iterations (struct loop *loop, int flags) /* Skip big loops. */ if (nunroll <= 1) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, is too big\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, is too big\n"); return; } @@ -748,24 +759,25 @@ decide_unroll_runtime_iterations (struct loop *loop, int flags) /* Check simpleness. */ if (!desc->simple_p || desc->assumptions) { - if (rtl_dump_file) - fprintf (rtl_dump_file, - ";; Unable to prove that the number of iterations can be counted in runtime\n"); + if (dump_file) + fprintf (dump_file, + ";; Unable to prove that the number of iterations " + "can be counted in runtime\n"); return; } if (desc->const_iter) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Loop iterates constant times\n"); + if (dump_file) + fprintf (dump_file, ";; Loop iterates constant times\n"); return; } /* If we have profile feedback, check whether the loop rolls. */ if (loop->header->count && expected_loop_iterations (loop) < 2 * nunroll) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unrolling loop, doesn't roll\n"); + if (dump_file) + fprintf (dump_file, ";; Not unrolling loop, doesn't roll\n"); return; } @@ -777,9 +789,10 @@ decide_unroll_runtime_iterations (struct loop *loop, int flags) loop->lpt_decision.decision = LPT_UNROLL_RUNTIME; loop->lpt_decision.times = i - 1; - if (rtl_dump_file) - fprintf (rtl_dump_file, - ";; Decided to unroll the runtime computable times rolling loop, %d times.\n", + if (dump_file) + fprintf (dump_file, + ";; Decided to unroll the runtime computable " + "times rolling loop, %d times.\n", loop->lpt_decision.times); } @@ -1013,9 +1026,10 @@ unroll_loop_runtime_iterations (struct loops *loops, struct loop *loop) desc->niter_max--; } - if (rtl_dump_file) - fprintf (rtl_dump_file, - ";; Unrolled loop %d times, counting # of iterations in runtime, %i insns\n", + if (dump_file) + fprintf (dump_file, + ";; Unrolled loop %d times, counting # of iterations " + "in runtime, %i insns\n", max_unroll, num_loop_insns (loop)); } @@ -1032,8 +1046,8 @@ decide_peel_simple (struct loop *loop, int flags) return; } - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n;; Considering simply peeling loop\n"); + if (dump_file) + fprintf (dump_file, "\n;; Considering simply peeling loop\n"); /* npeel = number of iterations to peel. */ npeel = PARAM_VALUE (PARAM_MAX_PEELED_INSNS) / loop->ninsns; @@ -1043,8 +1057,8 @@ decide_peel_simple (struct loop *loop, int flags) /* Skip big loops. */ if (!npeel) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, is too big\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, is too big\n"); return; } @@ -1054,8 +1068,8 @@ decide_peel_simple (struct loop *loop, int flags) /* Check number of iterations. */ if (desc->simple_p && !desc->assumptions && desc->const_iter) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Loop iterates constant times\n"); + if (dump_file) + fprintf (dump_file, ";; Loop iterates constant times\n"); return; } @@ -1063,8 +1077,8 @@ decide_peel_simple (struct loop *loop, int flags) of mispredicts. */ if (num_loop_branches (loop) > 1) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not peeling, contains branches\n"); + if (dump_file) + fprintf (dump_file, ";; Not peeling, contains branches\n"); return; } @@ -1073,11 +1087,13 @@ decide_peel_simple (struct loop *loop, int flags) unsigned niter = expected_loop_iterations (loop); if (niter + 1 > npeel) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, ";; Not peeling loop, rolls too much ("); - fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT) (niter + 1)); - fprintf (rtl_dump_file, " iterations > %d [maximum peelings])\n", npeel); + fprintf (dump_file, ";; Not peeling loop, rolls too much ("); + fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, + (HOST_WIDEST_INT) (niter + 1)); + fprintf (dump_file, " iterations > %d [maximum peelings])\n", + npeel); } return; } @@ -1087,8 +1103,8 @@ decide_peel_simple (struct loop *loop, int flags) { /* For now we have no good heuristics to decide whether loop peeling will be effective, so disable it. */ - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, ";; Not peeling loop, no evidence it will be profitable\n"); return; } @@ -1097,8 +1113,8 @@ decide_peel_simple (struct loop *loop, int flags) loop->lpt_decision.decision = LPT_PEEL_SIMPLE; loop->lpt_decision.times = npeel; - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Decided to simply peel the loop, %d times.\n", + if (dump_file) + fprintf (dump_file, ";; Decided to simply peel the loop, %d times.\n", loop->lpt_decision.times); } @@ -1150,8 +1166,8 @@ peel_loop_simple (struct loops *loops, struct loop *loop) free_simple_loop_desc (loop); } } - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Peeling loop %d times\n", npeel); + if (dump_file) + fprintf (dump_file, ";; Peeling loop %d times\n", npeel); } /* Decide whether to unroll LOOP stupidly and how much. */ @@ -1167,13 +1183,14 @@ decide_unroll_stupid (struct loop *loop, int flags) return; } - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n;; Considering unrolling loop stupidly\n"); + if (dump_file) + fprintf (dump_file, "\n;; Considering unrolling loop stupidly\n"); /* nunroll = total number of copies of the original loop body in unrolled loop (i.e. if it is 2, we have to duplicate loop body once. */ nunroll = PARAM_VALUE (PARAM_MAX_UNROLLED_INSNS) / loop->ninsns; - nunroll_by_av = PARAM_VALUE (PARAM_MAX_AVERAGE_UNROLLED_INSNS) / loop->av_ninsns; + nunroll_by_av + = PARAM_VALUE (PARAM_MAX_AVERAGE_UNROLLED_INSNS) / loop->av_ninsns; if (nunroll > nunroll_by_av) nunroll = nunroll_by_av; if (nunroll > (unsigned) PARAM_VALUE (PARAM_MAX_UNROLL_TIMES)) @@ -1182,8 +1199,8 @@ decide_unroll_stupid (struct loop *loop, int flags) /* Skip big loops. */ if (nunroll <= 1) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not considering loop, is too big\n"); + if (dump_file) + fprintf (dump_file, ";; Not considering loop, is too big\n"); return; } @@ -1193,8 +1210,8 @@ decide_unroll_stupid (struct loop *loop, int flags) /* Check simpleness. */ if (desc->simple_p && !desc->assumptions) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; The loop is simple\n"); + if (dump_file) + fprintf (dump_file, ";; The loop is simple\n"); return; } @@ -1202,8 +1219,8 @@ decide_unroll_stupid (struct loop *loop, int flags) of mispredicts. */ if (num_loop_branches (loop) > 1) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unrolling, contains branches\n"); + if (dump_file) + fprintf (dump_file, ";; Not unrolling, contains branches\n"); return; } @@ -1211,8 +1228,8 @@ decide_unroll_stupid (struct loop *loop, int flags) if (loop->header->count && expected_loop_iterations (loop) < 2 * nunroll) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unrolling loop, doesn't roll\n"); + if (dump_file) + fprintf (dump_file, ";; Not unrolling loop, doesn't roll\n"); return; } @@ -1225,8 +1242,8 @@ decide_unroll_stupid (struct loop *loop, int flags) loop->lpt_decision.decision = LPT_UNROLL_STUPID; loop->lpt_decision.times = i - 1; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, ";; Decided to unroll the loop stupidly, %d times.\n", loop->lpt_decision.times); } @@ -1276,7 +1293,7 @@ unroll_loop_stupid (struct loops *loops, struct loop *loop) desc->simple_p = false; } - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Unrolled loop %d times, %i insns\n", + if (dump_file) + fprintf (dump_file, ";; Unrolled loop %d times, %i insns\n", nunroll, num_loop_insns (loop)); } diff --git a/gcc/loop-unswitch.c b/gcc/loop-unswitch.c index 6febbed966b..a056841ef8a 100644 --- a/gcc/loop-unswitch.c +++ b/gcc/loop-unswitch.c @@ -269,48 +269,48 @@ unswitch_single_loop (struct loops *loops, struct loop *loop, /* Do not unswitch too much. */ if (num > PARAM_VALUE (PARAM_MAX_UNSWITCH_LEVEL)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unswitching anymore, hit max level\n"); + if (dump_file) + fprintf (dump_file, ";; Not unswitching anymore, hit max level\n"); return; } /* Only unswitch innermost loops. */ if (loop->inner) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unswitching, not innermost loop\n"); + if (dump_file) + fprintf (dump_file, ";; Not unswitching, not innermost loop\n"); return; } /* We must be able to duplicate loop body. */ if (!can_duplicate_loop_p (loop)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unswitching, can't duplicate loop\n"); + if (dump_file) + fprintf (dump_file, ";; Not unswitching, can't duplicate loop\n"); return; } /* The loop should not be too large, to limit code growth. */ if (num_loop_insns (loop) > PARAM_VALUE (PARAM_MAX_UNSWITCH_INSNS)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unswitching, loop too big\n"); + if (dump_file) + fprintf (dump_file, ";; Not unswitching, loop too big\n"); return; } /* Do not unswitch in cold areas. */ if (!maybe_hot_bb_p (loop->header)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unswitching, not hot area\n"); + if (dump_file) + fprintf (dump_file, ";; Not unswitching, not hot area\n"); return; } /* Nor if the loop usually does not roll. */ if (expected_loop_iterations (loop) < 1) { - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Not unswitching, loop iterations < 1\n"); + if (dump_file) + fprintf (dump_file, ";; Not unswitching, loop iterations < 1\n"); return; } @@ -364,8 +364,8 @@ unswitch_single_loop (struct loops *loops, struct loop *loop, else rconds = cond_checked; - if (rtl_dump_file) - fprintf (rtl_dump_file, ";; Unswitching loop\n"); + if (dump_file) + fprintf (dump_file, ";; Unswitching loop\n"); /* Unswitch the loop on this condition. */ nloop = unswitch_loop (loops, loop, bbs[i], cond, cinsn); diff --git a/gcc/output.h b/gcc/output.h index 05a3743726f..c4e5bb2f63f 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -418,7 +418,7 @@ extern int current_function_uses_only_leaf_regs; /* Default file in which to dump debug output. */ #ifdef BUFSIZ -extern FILE *rtl_dump_file; +extern FILE *dump_file; #endif /* Nonnull if the insn currently being emitted was a COND_EXEC pattern. */ diff --git a/gcc/predict.c b/gcc/predict.c index 44ee10c9fe6..bed0384cd24 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -260,29 +260,29 @@ dump_prediction (enum br_predictor predictor, int probability, { edge e = bb->succ; - if (!rtl_dump_file) + if (!dump_file) return; while (e && (e->flags & EDGE_FALLTHRU)) e = e->succ_next; - fprintf (rtl_dump_file, " %s heuristics%s: %.1f%%", + fprintf (dump_file, " %s heuristics%s: %.1f%%", predictor_info[predictor].name, used ? "" : " (ignored)", probability * 100.0 / REG_BR_PROB_BASE); if (bb->count) { - fprintf (rtl_dump_file, " exec "); - fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, bb->count); + fprintf (dump_file, " exec "); + fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, bb->count); if (e) { - fprintf (rtl_dump_file, " hit "); - fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, e->count); - fprintf (rtl_dump_file, " (%.1f%%)", e->count * 100.0 / bb->count); + fprintf (dump_file, " hit "); + fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, e->count); + fprintf (dump_file, " (%.1f%%)", e->count * 100.0 / bb->count); } } - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "\n"); } /* Combine all REG_BR_PRED notes into single probability and attach REG_BR_PROB @@ -301,8 +301,8 @@ combine_predictions_for_insn (rtx insn, basic_block bb) bool first_match = false; bool found = false; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Predictions for insn %i bb %i\n", INSN_UID (insn), + if (dump_file) + fprintf (dump_file, "Predictions for insn %i bb %i\n", INSN_UID (insn), bb->index); /* We implement "first match" heuristics and use probability guessed @@ -915,8 +915,8 @@ propagate_freq (struct loop *loop) if (BLOCK_INFO (e->src)->tovisit && !(e->flags & EDGE_DFS_BACK)) count++; else if (BLOCK_INFO (e->src)->tovisit - && rtl_dump_file && !EDGE_INFO (e)->back_edge) - fprintf (rtl_dump_file, + && dump_file && !EDGE_INFO (e)->back_edge) + fprintf (dump_file, "Irreducible region hit, ignoring edge to %i->%i\n", e->src->index, bb->index); BLOCK_INFO (bb)->npredecessors = count; diff --git a/gcc/profile.c b/gcc/profile.c index b7b39a2f5a8..238a2e264c2 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -151,8 +151,8 @@ instrument_edges (struct edge_list *el) if (e->flags & EDGE_ABNORMAL) abort (); - if (rtl_dump_file) - fprintf (rtl_dump_file, "Edge %d to %d instrumented%s\n", + if (dump_file) + fprintf (dump_file, "Edge %d to %d instrumented%s\n", e->src->index, e->dest->index, EDGE_CRITICAL_P (e) ? " (and split)" : ""); edge_profile = gen_edge_profiler (num_instr_edges++); @@ -163,8 +163,8 @@ instrument_edges (struct edge_list *el) } total_num_blocks_created += num_edges; - if (rtl_dump_file) - fprintf (rtl_dump_file, "%d edges instrumented\n", num_instr_edges); + if (dump_file) + fprintf (dump_file, "%d edges instrumented\n", num_instr_edges); return num_instr_edges; } @@ -255,8 +255,8 @@ get_exec_counts (void) if (!counts) return NULL; - if (rtl_dump_file && profile_info) - fprintf(rtl_dump_file, "Merged %u profiles with maximal count %u.\n", + if (dump_file && profile_info) + fprintf(dump_file, "Merged %u profiles with maximal count %u.\n", profile_info->runs, (unsigned) profile_info->sum_max); return counts; @@ -343,18 +343,18 @@ compute_branch_probabilities (void) EDGE_INFO (e)->count_valid = 1; BB_INFO (bb)->succ_count--; BB_INFO (e->dest)->pred_count--; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "\nRead edge from %i to %i, count:", + fprintf (dump_file, "\nRead edge from %i to %i, count:", bb->index, e->dest->index); - fprintf (rtl_dump_file, HOST_WIDEST_INT_PRINT_DEC, + fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT) e->count); } } } - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n%d edge counts read\n", num_edges); + if (dump_file) + fprintf (dump_file, "\n%d edge counts read\n", num_edges); /* For every block in the file, - if every exit/entrance edge has a known count, then set the block count @@ -466,12 +466,12 @@ compute_branch_probabilities (void) } } } - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); total_num_passes += passes; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Graph solving took %d passes.\n\n", passes); + if (dump_file) + fprintf (dump_file, "Graph solving took %d passes.\n\n", passes); /* If the graph has been correctly solved, every block will have a succ and pred count of zero. */ @@ -600,14 +600,14 @@ compute_branch_probabilities (void) } } - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "%d branches\n", num_branches); - fprintf (rtl_dump_file, "%d branches never executed\n", + fprintf (dump_file, "%d branches\n", num_branches); + fprintf (dump_file, "%d branches never executed\n", num_never_executed); if (num_branches) for (i = 0; i < 10; i++) - fprintf (rtl_dump_file, "%d%% branches in range %d-%d%%\n", + fprintf (dump_file, "%d%% branches in range %d-%d%%\n", (hist_br_prob[i] + hist_br_prob[19-i]) * 100 / num_branches, 5 * i, 5 * i + 5); @@ -616,8 +616,8 @@ compute_branch_probabilities (void) for (i = 0; i < 20; i++) total_hist_br_prob[i] += hist_br_prob[i]; - fputc ('\n', rtl_dump_file); - fputc ('\n', rtl_dump_file); + fputc ('\n', dump_file); + fputc ('\n', dump_file); } free_aux_for_blocks (); @@ -752,15 +752,15 @@ branch_prob (void) if (need_exit_edge && !have_exit_edge) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Adding fake exit edge to bb %i\n", + if (dump_file) + fprintf (dump_file, "Adding fake exit edge to bb %i\n", bb->index); make_edge (bb, EXIT_BLOCK_PTR, EDGE_FAKE); } if (need_entry_edge && !have_entry_edge) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Adding fake entry edge to bb %i\n", + if (dump_file) + fprintf (dump_file, "Adding fake entry edge to bb %i\n", bb->index); make_edge (ENTRY_BLOCK_PTR, bb, EDGE_FAKE); } @@ -817,16 +817,16 @@ branch_prob (void) } total_num_blocks += n_basic_blocks + 2; - if (rtl_dump_file) - fprintf (rtl_dump_file, "%d basic blocks\n", n_basic_blocks); + if (dump_file) + fprintf (dump_file, "%d basic blocks\n", n_basic_blocks); total_num_edges += num_edges; - if (rtl_dump_file) - fprintf (rtl_dump_file, "%d edges\n", num_edges); + if (dump_file) + fprintf (dump_file, "%d edges\n", num_edges); total_num_edges_ignored += ignored_edges; - if (rtl_dump_file) - fprintf (rtl_dump_file, "%d ignored edges\n", ignored_edges); + if (dump_file) + fprintf (dump_file, "%d ignored edges\n", ignored_edges); /* Write the data from which gcov can reconstruct the basic block graph. */ @@ -993,8 +993,8 @@ branch_prob (void) /* Re-merge split basic blocks and the mess introduced by insert_insn_on_edge. */ cleanup_cfg (profile_arc_flag ? CLEANUP_EXPENSIVE : 0); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); free_edge_list (el); } @@ -1066,8 +1066,8 @@ find_spanning_tree (struct edge_list *el) && !EDGE_INFO (e)->ignore && (find_group (e->src) != find_group (e->dest))) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Abnormal edge %d to %d put to tree\n", + if (dump_file) + fprintf (dump_file, "Abnormal edge %d to %d put to tree\n", e->src->index, e->dest->index); EDGE_INFO (e)->on_tree = 1; union_groups (e->src, e->dest); @@ -1081,8 +1081,8 @@ find_spanning_tree (struct edge_list *el) if (EDGE_CRITICAL_P (e) && !EDGE_INFO (e)->ignore && find_group (e->src) != find_group (e->dest)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Critical edge %d to %d put to tree\n", + if (dump_file) + fprintf (dump_file, "Critical edge %d to %d put to tree\n", e->src->index, e->dest->index); EDGE_INFO (e)->on_tree = 1; union_groups (e->src, e->dest); @@ -1096,8 +1096,8 @@ find_spanning_tree (struct edge_list *el) if (!EDGE_INFO (e)->ignore && find_group (e->src) != find_group (e->dest)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "Normal edge %d to %d put to tree\n", + if (dump_file) + fprintf (dump_file, "Normal edge %d to %d put to tree\n", e->src->index, e->dest->index); EDGE_INFO (e)->on_tree = 1; union_groups (e->src, e->dest); @@ -1134,34 +1134,34 @@ init_branch_prob (void) void end_branch_prob (void) { - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "\n"); - fprintf (rtl_dump_file, "Total number of blocks: %d\n", + fprintf (dump_file, "\n"); + fprintf (dump_file, "Total number of blocks: %d\n", total_num_blocks); - fprintf (rtl_dump_file, "Total number of edges: %d\n", total_num_edges); - fprintf (rtl_dump_file, "Total number of ignored edges: %d\n", + fprintf (dump_file, "Total number of edges: %d\n", total_num_edges); + fprintf (dump_file, "Total number of ignored edges: %d\n", total_num_edges_ignored); - fprintf (rtl_dump_file, "Total number of instrumented edges: %d\n", + fprintf (dump_file, "Total number of instrumented edges: %d\n", total_num_edges_instrumented); - fprintf (rtl_dump_file, "Total number of blocks created: %d\n", + fprintf (dump_file, "Total number of blocks created: %d\n", total_num_blocks_created); - fprintf (rtl_dump_file, "Total number of graph solution passes: %d\n", + fprintf (dump_file, "Total number of graph solution passes: %d\n", total_num_passes); if (total_num_times_called != 0) - fprintf (rtl_dump_file, "Average number of graph solution passes: %d\n", + fprintf (dump_file, "Average number of graph solution passes: %d\n", (total_num_passes + (total_num_times_called >> 1)) / total_num_times_called); - fprintf (rtl_dump_file, "Total number of branches: %d\n", + fprintf (dump_file, "Total number of branches: %d\n", total_num_branches); - fprintf (rtl_dump_file, "Total number of branches never executed: %d\n", + fprintf (dump_file, "Total number of branches never executed: %d\n", total_num_never_executed); if (total_num_branches) { int i; for (i = 0; i < 10; i++) - fprintf (rtl_dump_file, "%d%% branches in range %d-%d%%\n", + fprintf (dump_file, "%d%% branches in range %d-%d%%\n", (total_hist_br_prob[i] + total_hist_br_prob[19-i]) * 100 / total_num_branches, 5*i, 5*i+5); } diff --git a/gcc/ra-build.c b/gcc/ra-build.c index 3e2da55df04..505a1f4c39f 100644 --- a/gcc/ra-build.c +++ b/gcc/ra-build.c @@ -2944,7 +2944,7 @@ handle_asm_insn (struct df *df, rtx insn) record_conflict (web, hardreg2web[c]); #endif } - if (rtl_dump_file) + if (dump_file) { int c; ra_debug_msg (DUMP_ASM, " ASM constrain Web %d conflicts with:", web->id); diff --git a/gcc/ra-colorize.c b/gcc/ra-colorize.c index 245292b11cc..dc073fe7271 100644 --- a/gcc/ra-colorize.c +++ b/gcc/ra-colorize.c @@ -2608,7 +2608,7 @@ check_uncoalesced_moves (void) void ra_colorize_graph (struct df *df) { - if (rtl_dump_file) + if (dump_file) dump_igraph (df); build_worklists (df); diff --git a/gcc/ra-debug.c b/gcc/ra-debug.c index 780c765d4d1..633f37524c2 100644 --- a/gcc/ra-debug.c +++ b/gcc/ra-debug.c @@ -54,8 +54,8 @@ ra_debug_msg (unsigned int level, const char *format, ...) va_list ap; va_start (ap, format); - if ((debug_new_regalloc & level) != 0 && rtl_dump_file != NULL) - vfprintf (rtl_dump_file, format, ap); + if ((debug_new_regalloc & level) != 0 && dump_file != NULL) + vfprintf (dump_file, format, ap); va_end (ap); } @@ -643,7 +643,7 @@ dump_igraph (struct df *df ATTRIBUTE_UNUSED) int num = 0; int num2; unsigned int i; - if (!rtl_dump_file || (debug_new_regalloc & (DUMP_IGRAPH | DUMP_WEBS)) == 0) + if (!dump_file || (debug_new_regalloc & (DUMP_IGRAPH | DUMP_WEBS)) == 0) return; ra_debug_msg (DUMP_IGRAPH, "conflicts:\n "); for (def1 = 0; def1 < num_webs; def1++) @@ -726,7 +726,7 @@ dump_igraph_machine (void) { unsigned int i; - if (!rtl_dump_file || (debug_new_regalloc & DUMP_IGRAPH_M) == 0) + if (!dump_file || (debug_new_regalloc & DUMP_IGRAPH_M) == 0) return; ra_debug_msg (DUMP_IGRAPH_M, "g %d %d\n", num_webs - num_subwebs, FIRST_PSEUDO_REGISTER); @@ -786,7 +786,7 @@ dump_constraints (void) { rtx insn; int i; - if (!rtl_dump_file || (debug_new_regalloc & DUMP_CONSTRAINTS) == 0) + if (!dump_file || (debug_new_regalloc & DUMP_CONSTRAINTS) == 0) return; for (i = FIRST_PSEUDO_REGISTER; i < ra_max_regno; i++) if (regno_reg_rtx[i] && GET_CODE (regno_reg_rtx[i]) == REG) @@ -839,7 +839,7 @@ dump_graph_cost (unsigned int level, const char *msg) { unsigned int i; unsigned HOST_WIDE_INT cost; - if (!rtl_dump_file || (debug_new_regalloc & level) == 0) + if (!dump_file || (debug_new_regalloc & level) == 0) return; cost = 0; @@ -861,7 +861,7 @@ dump_ra (struct df *df ATTRIBUTE_UNUSED) { struct web *web; struct dlist *d; - if (!rtl_dump_file || (debug_new_regalloc & DUMP_RESULTS) == 0) + if (!dump_file || (debug_new_regalloc & DUMP_RESULTS) == 0) return; ra_debug_msg (DUMP_RESULTS, "\nColored:\n"); diff --git a/gcc/ra-rewrite.c b/gcc/ra-rewrite.c index b0fed6cd194..6c6a53d27b6 100644 --- a/gcc/ra-rewrite.c +++ b/gcc/ra-rewrite.c @@ -1534,10 +1534,10 @@ detect_web_parts_to_rebuild (void) BITMAP_AND_COMPL); live_at_end += 2; - if (rtl_dump_file && (debug_new_regalloc & DUMP_REBUILD) != 0) + if (dump_file && (debug_new_regalloc & DUMP_REBUILD) != 0) { ra_debug_msg (DUMP_REBUILD, "need to check these uses:\n"); - dump_sbitmap_file (rtl_dump_file, last_check_uses); + dump_sbitmap_file (dump_file, last_check_uses); } sbitmap_free (already_webs); BITMAP_XFREE (uses_as_bitmap); @@ -647,7 +647,7 @@ void reg_alloc (void) { int changed; - FILE *ra_dump_file = rtl_dump_file; + FILE *ra_dump_file = dump_file; rtx last = get_last_insn (); if (! INSN_P (last)) @@ -691,16 +691,16 @@ reg_alloc (void) break; case 6: debug_new_regalloc = DUMP_VALIDIFY; break; } - if (!rtl_dump_file) + if (!dump_file) debug_new_regalloc = 0; /* Run regclass first, so we know the preferred and alternate classes for each pseudo. Deactivate emitting of debug info, if it's not explicitly requested. */ if ((debug_new_regalloc & DUMP_REGCLASS) == 0) - rtl_dump_file = NULL; - regclass (get_insns (), max_reg_num (), rtl_dump_file); - rtl_dump_file = ra_dump_file; + dump_file = NULL; + regclass (get_insns (), max_reg_num (), dump_file); + dump_file = ra_dump_file; /* We don't use those NOTEs, and as we anyway change all registers, they only make problems later. */ @@ -758,10 +758,10 @@ reg_alloc (void) if ((debug_new_regalloc & DUMP_DF) != 0) { rtx insn; - df_dump (df, DF_HARD_REGS, rtl_dump_file); + df_dump (df, DF_HARD_REGS, dump_file); for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) if (INSN_P (insn)) - df_insn_debug_regno (df, insn, rtl_dump_file); + df_insn_debug_regno (df, insn, dump_file); } check_df (df); @@ -795,7 +795,7 @@ reg_alloc (void) therefore repeat some things, including some initialization of global data structures. */ if ((debug_new_regalloc & DUMP_REGCLASS) == 0) - rtl_dump_file = NULL; + dump_file = NULL; /* We have new pseudos (the stackwebs). */ allocate_reg_info (max_reg_num (), FALSE, FALSE); /* And new insns. */ @@ -806,8 +806,8 @@ reg_alloc (void) reg_scan_update (get_insns (), NULL, max_regno); max_regno = max_reg_num (); /* And they need useful classes too. */ - regclass (get_insns (), max_reg_num (), rtl_dump_file); - rtl_dump_file = ra_dump_file; + regclass (get_insns (), max_reg_num (), dump_file); + dump_file = ra_dump_file; /* Remember the number of defs and uses, so we can distinguish new from old refs in the next pass. */ @@ -819,8 +819,8 @@ reg_alloc (void) dump_ra (df); if (changed && (debug_new_regalloc & DUMP_RTL) != 0) { - ra_print_rtl_with_bb (rtl_dump_file, get_insns ()); - fflush (rtl_dump_file); + ra_print_rtl_with_bb (dump_file, get_insns ()); + fflush (dump_file); } /* Reset the web lists. */ @@ -838,15 +838,15 @@ reg_alloc (void) ra_debug_msg (DUMP_COSTS, "ticks for build-phase: %ld\n", ticks_build); ra_debug_msg (DUMP_COSTS, "ticks for rebuild-phase: %ld\n", ticks_rebuild); if ((debug_new_regalloc & (DUMP_FINAL_RTL | DUMP_RTL)) != 0) - ra_print_rtl_with_bb (rtl_dump_file, get_insns ()); + ra_print_rtl_with_bb (dump_file, get_insns ()); /* We might have new pseudos, so allocate the info arrays for them. */ if ((debug_new_regalloc & DUMP_SM) == 0) - rtl_dump_file = NULL; + dump_file = NULL; no_new_pseudos = 0; allocate_reg_info (max_reg_num (), FALSE, FALSE); no_new_pseudos = 1; - rtl_dump_file = ra_dump_file; + dump_file = ra_dump_file; /* Some spill insns could've been inserted after trapping calls, i.e. at the end of a basic block, which really ends at that call. @@ -855,14 +855,14 @@ reg_alloc (void) /* Cleanup the flow graph. */ if ((debug_new_regalloc & DUMP_LAST_FLOW) == 0) - rtl_dump_file = NULL; - life_analysis (get_insns (), rtl_dump_file, + dump_file = NULL; + life_analysis (get_insns (), dump_file, PROP_DEATH_NOTES | PROP_LOG_LINKS | PROP_REG_INFO); cleanup_cfg (CLEANUP_EXPENSIVE); recompute_reg_usage (get_insns (), TRUE); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); - rtl_dump_file = ra_dump_file; + if (dump_file) + dump_flow_info (dump_file); + dump_file = ra_dump_file; /* update_equiv_regs() can't be called after register allocation. It might delete some pseudos, and insert other insns setting @@ -882,8 +882,8 @@ reg_alloc (void) remove_suspicious_death_notes (); if ((debug_new_regalloc & DUMP_LAST_RTL) != 0) - ra_print_rtl_with_bb (rtl_dump_file, get_insns ()); - dump_static_insn_cost (rtl_dump_file, + ra_print_rtl_with_bb (dump_file, get_insns ()); + dump_static_insn_cost (dump_file, "after allocation/spilling, before reload", NULL); /* Allocate the reg_equiv_memory_loc array for reload. */ @@ -891,7 +891,7 @@ reg_alloc (void) /* And possibly initialize it. */ allocate_initial_values (reg_equiv_memory_loc); /* And one last regclass pass just before reload. */ - regclass (get_insns (), max_reg_num (), rtl_dump_file); + regclass (get_insns (), max_reg_num (), dump_file); } /* diff --git a/gcc/regrename.c b/gcc/regrename.c index 8a83b9687e2..0623e9d5380 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -204,12 +204,12 @@ regrename_optimize (void) CLEAR_HARD_REG_SET (unavailable); - if (rtl_dump_file) - fprintf (rtl_dump_file, "\nBasic block %d:\n", bb->index); + if (dump_file) + fprintf (dump_file, "\nBasic block %d:\n", bb->index); all_chains = build_def_use (bb); - if (rtl_dump_file) + if (dump_file) dump_def_use_chain (all_chains); CLEAR_HARD_REG_SET (unavailable); @@ -327,27 +327,27 @@ regrename_optimize (void) } } - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Register %s in insn %d", + fprintf (dump_file, "Register %s in insn %d", reg_names[reg], INSN_UID (last->insn)); if (last->need_caller_save_reg) - fprintf (rtl_dump_file, " crosses a call"); + fprintf (dump_file, " crosses a call"); } if (best_new_reg == reg) { tick[reg] = ++this_tick; - if (rtl_dump_file) - fprintf (rtl_dump_file, "; no available better choice\n"); + if (dump_file) + fprintf (dump_file, "; no available better choice\n"); continue; } do_replace (this, best_new_reg); tick[best_new_reg] = ++this_tick; - if (rtl_dump_file) - fprintf (rtl_dump_file, ", renamed as %s\n", reg_names[best_new_reg]); + if (dump_file) + fprintf (dump_file, ", renamed as %s\n", reg_names[best_new_reg]); } obstack_free (&rename_obstack, first_obj); @@ -355,8 +355,8 @@ regrename_optimize (void) obstack_free (&rename_obstack, NULL); - if (rtl_dump_file) - fputc ('\n', rtl_dump_file); + if (dump_file) + fputc ('\n', dump_file); count_or_remove_death_notes (NULL, 1); update_life_info (NULL, UPDATE_LIFE_LOCAL, @@ -479,16 +479,16 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class class, { this->next_chain = closed_chains; closed_chains = this; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Closing chain %s at insn %d (%s)\n", reg_names[REGNO (*this->loc)], INSN_UID (insn), scan_actions_name[(int) action]); } else { - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Discarding chain %s at insn %d (%s)\n", reg_names[REGNO (*this->loc)], INSN_UID (insn), scan_actions_name[(int) action]); @@ -963,7 +963,7 @@ build_def_use (basic_block bb) return closed_chains; } -/* Dump all def/use chains in CHAINS to RTL_DUMP_FILE. They are +/* Dump all def/use chains in CHAINS to DUMP_FILE. They are printed in reverse order as that's how we build them. */ static void @@ -974,14 +974,14 @@ dump_def_use_chain (struct du_chain *chains) struct du_chain *this = chains; int r = REGNO (*this->loc); int nregs = hard_regno_nregs[r][GET_MODE (*this->loc)]; - fprintf (rtl_dump_file, "Register %s (%d):", reg_names[r], nregs); + fprintf (dump_file, "Register %s (%d):", reg_names[r], nregs); while (this) { - fprintf (rtl_dump_file, " %d [%s]", INSN_UID (this->insn), + fprintf (dump_file, " %d [%s]", INSN_UID (this->insn), reg_class_names[this->class]); this = this->next_use; } - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "\n"); chains = chains->next_chain; } } @@ -1367,8 +1367,8 @@ replace_oldest_value_reg (rtx *loc, enum reg_class class, rtx insn, rtx new = find_oldest_value_reg (class, *loc, vd); if (new) { - if (rtl_dump_file) - fprintf (rtl_dump_file, "insn %u: replaced reg %u with %u\n", + if (dump_file) + fprintf (dump_file, "insn %u: replaced reg %u with %u\n", INSN_UID (insn), REGNO (*loc), REGNO (new)); *loc = new; @@ -1612,8 +1612,8 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) new = find_oldest_value_reg (REGNO_REG_CLASS (regno), src, vd); if (new && validate_change (insn, &SET_SRC (set), new, 0)) { - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "insn %u: replaced reg %u with %u\n", INSN_UID (insn), regno, REGNO (new)); changed = true; @@ -1633,8 +1633,8 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) { ORIGINAL_REGNO (new) = ORIGINAL_REGNO (src); REG_ATTRS (new) = REG_ATTRS (src); - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "insn %u: replaced reg %u with %u\n", INSN_UID (insn), regno, REGNO (new)); changed = true; @@ -1756,8 +1756,8 @@ copyprop_hardreg_forward (void) if (need_refresh) { - if (rtl_dump_file) - fputs ("\n\n", rtl_dump_file); + if (dump_file) + fputs ("\n\n", dump_file); /* ??? Irritatingly, delete_noop_moves does not take a set of blocks to scan, so we have to do a life update with no initial set of diff --git a/gcc/reload1.c b/gcc/reload1.c index b64abf1531b..1f21e4800a6 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1720,8 +1720,8 @@ find_reg (struct insn_chain *chain, int order) if (best_reg == -1) return 0; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Using reg %d for reload %d\n", best_reg, rnum); + if (dump_file) + fprintf (dump_file, "Using reg %d for reload %d\n", best_reg, rnum); rl->nregs = hard_regno_nregs[best_reg][rl->mode]; rl->regno = best_reg; @@ -1783,8 +1783,8 @@ find_reload_regs (struct insn_chain *chain) CLEAR_HARD_REG_SET (used_spill_regs_local); - if (rtl_dump_file) - fprintf (rtl_dump_file, "Spilling for insn %d.\n", INSN_UID (chain->insn)); + if (dump_file) + fprintf (dump_file, "Spilling for insn %d.\n", INSN_UID (chain->insn)); qsort (reload_order, n_reloads, sizeof (short), reload_reg_class_lower); @@ -3699,12 +3699,12 @@ finish_spills (int global) alter_reg (i, reg_old_renumber[i]); reg_old_renumber[i] = regno; - if (rtl_dump_file) + if (dump_file) { if (regno == -1) - fprintf (rtl_dump_file, " Register %d now on stack.\n\n", i); + fprintf (dump_file, " Register %d now on stack.\n\n", i); else - fprintf (rtl_dump_file, " Register %d now in %d.\n\n", + fprintf (dump_file, " Register %d now in %d.\n\n", i, reg_renumber[i]); } } @@ -6944,10 +6944,10 @@ emit_reload_insns (struct insn_chain *chain) other_operand_reload_insns = 0; /* Dump reloads into the dump file. */ - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "\nReloads for insn # %d\n", INSN_UID (insn)); - debug_reload_to_stream (rtl_dump_file); + fprintf (dump_file, "\nReloads for insn # %d\n", INSN_UID (insn)); + debug_reload_to_stream (dump_file); } /* Now output the instructions to copy the data into and out of the diff --git a/gcc/toplev.c b/gcc/toplev.c index 9e10d01d52f..d99c3bfccdd 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -306,7 +306,7 @@ enum dump_file_index " JK O Q WXY " */ -static struct dump_file_info dump_file[DFI_MAX] = +static struct dump_file_info dump_file_tbl[DFI_MAX] = { { "cgraph", 'U', 0, 0, 0 }, { "rtl", 'r', 0, 0, 0 }, @@ -1208,7 +1208,7 @@ int warn_return_type; FILE *asm_out_file; FILE *aux_info_file; -FILE *rtl_dump_file = NULL; +FILE *dump_file = NULL; FILE *cgraph_dump_file = NULL; /* The current working directory of a translation. It's generally the @@ -1479,42 +1479,42 @@ open_dump_file (enum dump_file_index index, tree decl) const char *open_arg; char seq[16]; - if (! dump_file[index].enabled) + if (! dump_file_tbl[index].enabled) return 0; timevar_push (TV_DUMP); - if (rtl_dump_file != NULL) - fclose (rtl_dump_file); + if (dump_file != NULL) + fclose (dump_file); sprintf (seq, DUMPFILE_FORMAT, index); - if (! dump_file[index].initialized) + if (! dump_file_tbl[index].initialized) { /* If we've not initialized the files, do so now. */ if (graph_dump_format != no_graph - && dump_file[index].graph_dump_p) + && dump_file_tbl[index].graph_dump_p) { - dump_name = concat (seq, dump_file[index].extension, NULL); + dump_name = concat (seq, dump_file_tbl[index].extension, NULL); clean_graph_dump_file (dump_base_name, dump_name); free (dump_name); } - dump_file[index].initialized = 1; + dump_file_tbl[index].initialized = 1; open_arg = "w"; } else open_arg = "a"; dump_name = concat (dump_base_name, seq, - dump_file[index].extension, NULL); + dump_file_tbl[index].extension, NULL); - rtl_dump_file = fopen (dump_name, open_arg); - if (rtl_dump_file == NULL) + dump_file = fopen (dump_name, open_arg); + if (dump_file == NULL) fatal_error ("can't open %s: %m", dump_name); free (dump_name); if (decl) - fprintf (rtl_dump_file, "\n;; Function %s%s\n\n", + fprintf (dump_file, "\n;; Function %s%s\n\n", (*lang_hooks.decl_printable_name) (decl, 2), cfun->function_frequency == FUNCTION_FREQUENCY_HOT ? " (hot)" @@ -1533,30 +1533,30 @@ close_dump_file (enum dump_file_index index, void (*func) (FILE *, rtx), rtx insns) { - if (! rtl_dump_file) + if (! dump_file) return; timevar_push (TV_DUMP); if (insns && graph_dump_format != no_graph - && dump_file[index].graph_dump_p) + && dump_file_tbl[index].graph_dump_p) { char seq[16]; char *suffix; sprintf (seq, DUMPFILE_FORMAT, index); - suffix = concat (seq, dump_file[index].extension, NULL); + suffix = concat (seq, dump_file_tbl[index].extension, NULL); print_rtl_graph_with_bb (dump_base_name, suffix, insns); free (suffix); } if (func && insns) - func (rtl_dump_file, insns); + func (dump_file, insns); - fflush (rtl_dump_file); - fclose (rtl_dump_file); + fflush (dump_file); + fclose (dump_file); - rtl_dump_file = NULL; + dump_file = NULL; timevar_pop (TV_DUMP); } @@ -1899,7 +1899,7 @@ compile_file (void) if (optimize > 0 && open_dump_file (DFI_combine, NULL)) { timevar_push (TV_DUMP); - dump_combine_total_stats (rtl_dump_file); + dump_combine_total_stats (dump_file); close_dump_file (DFI_combine, NULL, NULL_RTX); timevar_pop (TV_DUMP); } @@ -2073,7 +2073,7 @@ rest_of_handle_delay_slots (tree decl, rtx insns) timevar_push (TV_DBR_SCHED); open_dump_file (DFI_dbr, decl); - dbr_schedule (insns, rtl_dump_file); + dbr_schedule (insns, dump_file); close_dump_file (DFI_dbr, print_rtl, insns); timevar_pop (TV_DBR_SCHED); @@ -2108,7 +2108,7 @@ rest_of_handle_stack_regs (tree decl, rtx insns) timevar_push (TV_REG_STACK); open_dump_file (DFI_stack, decl); - if (reg_to_stack (insns, rtl_dump_file) && optimize) + if (reg_to_stack (insns, dump_file) && optimize) { if (cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0)) @@ -2166,7 +2166,7 @@ rest_of_handle_new_regalloc (tree decl, rtx insns) reg_alloc (); timevar_pop (TV_LOCAL_ALLOC); - if (dump_file[DFI_lreg].enabled) + if (dump_file_tbl[DFI_lreg].enabled) { timevar_push (TV_DUMP); @@ -2183,11 +2183,11 @@ rest_of_handle_new_regalloc (tree decl, rtx insns) timevar_pop (TV_GLOBAL_ALLOC); - if (dump_file[DFI_greg].enabled) + if (dump_file_tbl[DFI_greg].enabled) { timevar_push (TV_DUMP); - dump_global_regs (rtl_dump_file); + dump_global_regs (dump_file); close_dump_file (DFI_greg, print_rtl_with_bb, insns); timevar_pop (TV_DUMP); @@ -2217,7 +2217,7 @@ rest_of_handle_old_regalloc (tree decl, rtx insns) allocate_initial_values (reg_equiv_memory_loc); - regclass (insns, max_reg_num (), rtl_dump_file); + regclass (insns, max_reg_num (), dump_file); rebuild_notes = local_alloc (); timevar_pop (TV_LOCAL_ALLOC); @@ -2235,12 +2235,12 @@ rest_of_handle_old_regalloc (tree decl, rtx insns) timevar_pop (TV_JUMP); } - if (dump_file[DFI_lreg].enabled) + if (dump_file_tbl[DFI_lreg].enabled) { timevar_push (TV_DUMP); - dump_flow_info (rtl_dump_file); - dump_local_alloc (rtl_dump_file); + dump_flow_info (dump_file); + dump_local_alloc (dump_file); close_dump_file (DFI_lreg, print_rtl_with_bb, insns); timevar_pop (TV_DUMP); @@ -2255,7 +2255,7 @@ rest_of_handle_old_regalloc (tree decl, rtx insns) pass fixing up any insns that are invalid. */ if (optimize) - failure = global_alloc (rtl_dump_file); + failure = global_alloc (dump_file); else { build_insn_chain (insns); @@ -2264,11 +2264,11 @@ rest_of_handle_old_regalloc (tree decl, rtx insns) timevar_pop (TV_GLOBAL_ALLOC); - if (dump_file[DFI_greg].enabled) + if (dump_file_tbl[DFI_greg].enabled) { timevar_push (TV_DUMP); - dump_global_regs (rtl_dump_file); + dump_global_regs (dump_file); close_dump_file (DFI_greg, print_rtl_with_bb, insns); timevar_pop (TV_DUMP); @@ -2341,7 +2341,7 @@ rest_of_handle_sched (tree decl, rtx insns) /* Do control and data sched analysis, and write some of the results to dump file. */ - schedule_insns (rtl_dump_file); + schedule_insns (dump_file); close_dump_file (DFI_sched, print_rtl_with_bb, insns); } @@ -2364,14 +2364,14 @@ rest_of_handle_sched2 (tree decl, rtx insns) if (flag_sched2_use_superblocks || flag_sched2_use_traces) { - schedule_ebbs (rtl_dump_file); + schedule_ebbs (dump_file); /* No liveness updating code yet, but it should be easy to do. reg-stack recompute the liveness when needed for now. */ count_or_remove_death_notes (NULL, 1); cleanup_cfg (CLEANUP_EXPENSIVE); } else - schedule_insns (rtl_dump_file); + schedule_insns (dump_file); close_dump_file (DFI_sched2, print_rtl_with_bb, insns); timevar_pop (TV_SCHED2); @@ -2388,7 +2388,7 @@ rest_of_handle_regmove (tree decl, rtx insns) timevar_push (TV_REGMOVE); open_dump_file (DFI_regmove, decl); - regmove_optimize (insns, max_reg_num (), rtl_dump_file); + regmove_optimize (insns, max_reg_num (), dump_file); cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE); close_dump_file (DFI_regmove, print_rtl_with_bb, insns); @@ -2402,8 +2402,8 @@ static void rest_of_handle_tracer (tree decl, rtx insns) { open_dump_file (DFI_tracer, decl); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); tracer (); cleanup_cfg (CLEANUP_EXPENSIVE); reg_scan (insns, max_reg_num (), 0); @@ -2418,8 +2418,8 @@ rest_of_handle_if_conversion (tree decl, rtx insns) if (flag_if_conversion) { timevar_push (TV_IFCVT); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); cleanup_cfg (CLEANUP_EXPENSIVE); reg_scan (insns, max_reg_num (), 0); if_convert (0); @@ -2478,8 +2478,8 @@ rest_of_handle_branch_prob (tree decl, rtx insns) block. The loop infrastructure does the real job for us. */ flow_loops_find (&loops, LOOP_TREE); - if (rtl_dump_file) - flow_loops_dump (&loops, rtl_dump_file, NULL, 0); + if (dump_file) + flow_loops_dump (&loops, dump_file, NULL, 0); /* Estimate using heuristics if no profiling info is available. */ if (flag_guess_branch_prob) @@ -2511,8 +2511,8 @@ static void rest_of_handle_cfg (tree decl, rtx insns) { open_dump_file (DFI_cfg, decl); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); if (optimize) cleanup_cfg (CLEANUP_EXPENSIVE | (flag_thread_jumps ? CLEANUP_THREADING : 0)); @@ -2561,7 +2561,7 @@ rest_of_handle_sibling_calls (rtx insns) free_bb_for_insn (); find_exception_handler_labels (); rebuild_jump_labels (insns); - find_basic_blocks (insns, max_reg_num (), rtl_dump_file); + find_basic_blocks (insns, max_reg_num (), dump_file); /* There is pass ordering problem - we must lower NOTE_INSN_PREDICTION notes before simplifying cfg and we must do lowering after sibcall @@ -2587,7 +2587,7 @@ rest_of_handle_jump_bypass (tree decl, rtx insns) cleanup_cfg (CLEANUP_EXPENSIVE); reg_scan (insns, max_reg_num (), 1); - if (bypass_jumps (rtl_dump_file)) + if (bypass_jumps (dump_file)) { rebuild_jump_labels (insns); cleanup_cfg (CLEANUP_EXPENSIVE); @@ -2674,7 +2674,7 @@ rest_of_handle_inlining (tree decl) { if (DECL_STRUCT_FUNCTION (decl) && DECL_STRUCT_FUNCTION (decl)->saved_for_inline) - fprintf (rtl_dump_file, ";; (integrable)\n\n"); + fprintf (dump_file, ";; (integrable)\n\n"); close_dump_file (DFI_rtl, print_rtl, insns); } @@ -2726,7 +2726,7 @@ rest_of_handle_inlining (tree decl) optimize = 0; rebuild_jump_labels (insns); find_exception_handler_labels (); - find_basic_blocks (insns, max_reg_num (), rtl_dump_file); + find_basic_blocks (insns, max_reg_num (), dump_file); cleanup_cfg (CLEANUP_PRE_SIBCALL | CLEANUP_PRE_LOOP); optimize = saved_optimize; @@ -2758,8 +2758,8 @@ static void rest_of_handle_null_pointer (tree decl, rtx insns) { open_dump_file (DFI_null, decl); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); if (delete_null_pointer_checks (insns)) cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP); @@ -2807,7 +2807,7 @@ rest_of_handle_life (tree decl, rtx insns) #ifdef ENABLE_CHECKING verify_flow_info (); #endif - life_analysis (insns, rtl_dump_file, PROP_FINAL); + life_analysis (insns, dump_file, PROP_FINAL); if (optimize) cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_UPDATE_LIFE | CLEANUP_LOG_LINKS @@ -2850,13 +2850,13 @@ rest_of_handle_cse (tree decl, rtx insns) int tem; open_dump_file (DFI_cse, decl); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); timevar_push (TV_CSE); reg_scan (insns, max_reg_num (), 1); - tem = cse_main (insns, max_reg_num (), 0, rtl_dump_file); + tem = cse_main (insns, max_reg_num (), 0, dump_file); if (tem) rebuild_jump_labels (insns); if (purge_all_dead_edges (0)) @@ -2882,7 +2882,7 @@ rest_of_handle_cse (tree decl, rtx insns) /* The second pass of jump optimization is likely to have removed a bunch more instructions. */ - renumber_insns (rtl_dump_file); + renumber_insns (dump_file); timevar_pop (TV_CSE); close_dump_file (DFI_cse, print_rtl_with_bb, insns); @@ -2896,10 +2896,10 @@ rest_of_handle_cse2 (tree decl, rtx insns) timevar_push (TV_CSE2); open_dump_file (DFI_cse2, decl); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); /* CFG is no longer maintained up-to-date. */ - tem = cse_main (insns, max_reg_num (), 1, rtl_dump_file); + tem = cse_main (insns, max_reg_num (), 1, dump_file); /* Run a pass to eliminate duplicated assignments to condition code registers. We have to run this after bypass_jumps, because it @@ -2933,7 +2933,7 @@ rest_of_handle_gcse (tree decl, rtx insns) timevar_push (TV_GCSE); open_dump_file (DFI_gcse, decl); - tem = gcse_main (insns, rtl_dump_file); + tem = gcse_main (insns, dump_file); rebuild_jump_labels (insns); delete_trivially_dead_insns (insns, max_reg_num ()); @@ -2951,7 +2951,7 @@ rest_of_handle_gcse (tree decl, rtx insns) { timevar_push (TV_CSE); reg_scan (insns, max_reg_num (), 1); - tem2 = cse_main (insns, max_reg_num (), 0, rtl_dump_file); + tem2 = cse_main (insns, max_reg_num (), 0, dump_file); purge_all_dead_edges (0); delete_trivially_dead_insns (insns, max_reg_num ()); timevar_pop (TV_CSE); @@ -2972,7 +2972,7 @@ rest_of_handle_gcse (tree decl, rtx insns) { timevar_push (TV_CSE); reg_scan (insns, max_reg_num (), 1); - tem2 = cse_main (insns, max_reg_num (), 0, rtl_dump_file); + tem2 = cse_main (insns, max_reg_num (), 0, dump_file); purge_all_dead_edges (0); delete_trivially_dead_insns (insns, max_reg_num ()); timevar_pop (TV_CSE); @@ -3015,7 +3015,7 @@ rest_of_handle_loop_optimize (tree decl, rtx insns) cleanup_barriers (); /* We only want to perform unrolling once. */ - loop_optimize (insns, rtl_dump_file, do_unroll); + loop_optimize (insns, dump_file, do_unroll); do_unroll = 0; /* The first call to loop_optimize makes some instructions @@ -3029,13 +3029,13 @@ rest_of_handle_loop_optimize (tree decl, rtx insns) reg_scan (insns, max_reg_num (), 1); } cleanup_barriers (); - loop_optimize (insns, rtl_dump_file, do_unroll | LOOP_BCT | do_prefetch); + loop_optimize (insns, dump_file, do_unroll | LOOP_BCT | do_prefetch); /* Loop can create trivially dead instructions. */ delete_trivially_dead_insns (insns, max_reg_num ()); close_dump_file (DFI_loop, print_rtl, insns); timevar_pop (TV_LOOP); - find_basic_blocks (insns, max_reg_num (), rtl_dump_file); + find_basic_blocks (insns, max_reg_num (), dump_file); ggc_collect (); } @@ -3051,13 +3051,13 @@ rest_of_handle_loop2 (tree decl, rtx insns) timevar_push (TV_LOOP); open_dump_file (DFI_loop2, decl); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); /* Initialize structures for layout changes. */ cfg_layout_initialize (); - loops = loop_optimizer_init (rtl_dump_file); + loops = loop_optimizer_init (dump_file); if (loops) { @@ -3071,7 +3071,7 @@ rest_of_handle_loop2 (tree decl, rtx insns) (flag_unroll_loops ? UAP_UNROLL : 0) | (flag_unroll_all_loops ? UAP_UNROLL_ALL : 0)); - loop_optimizer_finalize (loops, rtl_dump_file); + loop_optimizer_finalize (loops, dump_file); } /* Finalize layout changes. */ @@ -3083,8 +3083,8 @@ rest_of_handle_loop2 (tree decl, rtx insns) cleanup_cfg (CLEANUP_EXPENSIVE); delete_trivially_dead_insns (insns, max_reg_num ()); reg_scan (insns, max_reg_num (), 0); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); close_dump_file (DFI_loop2, print_rtl_with_bb, get_insns ()); timevar_pop (TV_LOOP); ggc_collect (); @@ -3181,7 +3181,7 @@ rest_of_compilation (tree decl) insns = get_insns (); rebuild_jump_labels (insns); find_exception_handler_labels (); - find_basic_blocks (insns, max_reg_num (), rtl_dump_file); + find_basic_blocks (insns, max_reg_num (), dump_file); delete_unreachable_blocks (); @@ -3263,10 +3263,10 @@ rest_of_compilation (tree decl) reg_scan (insns, max_reg_num (), 0); rebuild_jump_labels (insns); - find_basic_blocks (insns, max_reg_num (), rtl_dump_file); + find_basic_blocks (insns, max_reg_num (), dump_file); delete_trivially_dead_insns (insns, max_reg_num ()); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_PRE_LOOP | (flag_thread_jumps ? CLEANUP_THREADING : 0)); @@ -3274,7 +3274,7 @@ rest_of_compilation (tree decl) { free_bb_for_insn (); copy_loop_headers (insns); - find_basic_blocks (insns, max_reg_num (), rtl_dump_file); + find_basic_blocks (insns, max_reg_num (), dump_file); } purge_line_number_notes (insns); @@ -3298,7 +3298,7 @@ rest_of_compilation (tree decl) future passes, allocate arrays whose dimensions involve the maximum instruction UID, so if we can reduce the maximum UID we'll save big on memory. */ - renumber_insns (rtl_dump_file); + renumber_insns (dump_file); timevar_pop (TV_JUMP); close_dump_file (DFI_jump, print_rtl_with_bb, insns); @@ -3471,7 +3471,7 @@ rest_of_compilation (tree decl) if (optimize) { - life_analysis (insns, rtl_dump_file, PROP_POSTRELOAD); + life_analysis (insns, dump_file, PROP_POSTRELOAD); cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0)); @@ -3498,7 +3498,7 @@ rest_of_compilation (tree decl) timevar_push (TV_PEEPHOLE2); open_dump_file (DFI_peephole2, decl); - peephole2_optimize (rtl_dump_file); + peephole2_optimize (dump_file); close_dump_file (DFI_peephole2, print_rtl_with_bb, insns); timevar_pop (TV_PEEPHOLE2); @@ -3767,7 +3767,7 @@ decode_d_option (const char *arg) { case 'a': for (i = 0; i < (int) DFI_MAX; ++i) - dump_file[i].enabled = 1; + dump_file_tbl[i].enabled = 1; break; case 'A': flag_debug_asm = 1; @@ -3798,9 +3798,9 @@ decode_d_option (const char *arg) default: matched = 0; for (i = 0; i < (int) DFI_MAX; ++i) - if (c == dump_file[i].debug_switch) + if (c == dump_file_tbl[i].debug_switch) { - dump_file[i].enabled = 1; + dump_file_tbl[i].enabled = 1; matched = 1; } @@ -4596,13 +4596,13 @@ finalize (void) int i; for (i = 0; i < (int) DFI_MAX; ++i) - if (dump_file[i].initialized && dump_file[i].graph_dump_p) + if (dump_file_tbl[i].initialized && dump_file_tbl[i].graph_dump_p) { char seq[16]; char *suffix; sprintf (seq, DUMPFILE_FORMAT, i); - suffix = concat (seq, dump_file[i].extension, NULL); + suffix = concat (seq, dump_file_tbl[i].extension, NULL); finish_graph_dump_file (dump_base_name, suffix); free (suffix); } @@ -4650,15 +4650,15 @@ do_compile (void) if (flag_unit_at_a_time) { open_dump_file (DFI_cgraph, NULL); - cgraph_dump_file = rtl_dump_file; - rtl_dump_file = NULL; + cgraph_dump_file = dump_file; + dump_file = NULL; } compile_file (); if (flag_unit_at_a_time) { - rtl_dump_file = cgraph_dump_file; + dump_file = cgraph_dump_file; cgraph_dump_file = NULL; close_dump_file (DFI_cgraph, NULL, NULL_RTX); } diff --git a/gcc/tracer.c b/gcc/tracer.c index 4769a47632f..b1d6768eeea 100644 --- a/gcc/tracer.c +++ b/gcc/tracer.c @@ -157,8 +157,8 @@ find_trace (basic_block bb, basic_block *trace) int i = 0; edge e; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Trace seed %i [%i]", bb->index, bb->frequency); + if (dump_file) + fprintf (dump_file, "Trace seed %i [%i]", bb->index, bb->frequency); while ((e = find_best_predecessor (bb)) != NULL) { @@ -166,12 +166,12 @@ find_trace (basic_block bb, basic_block *trace) if (seen (bb2) || (e->flags & (EDGE_DFS_BACK | EDGE_COMPLEX)) || find_best_successor (bb2) != e) break; - if (rtl_dump_file) - fprintf (rtl_dump_file, ",%i [%i]", bb->index, bb->frequency); + if (dump_file) + fprintf (dump_file, ",%i [%i]", bb->index, bb->frequency); bb = bb2; } - if (rtl_dump_file) - fprintf (rtl_dump_file, " forward %i [%i]", bb->index, bb->frequency); + if (dump_file) + fprintf (dump_file, " forward %i [%i]", bb->index, bb->frequency); trace[i++] = bb; /* Follow the trace in forward direction. */ @@ -181,12 +181,12 @@ find_trace (basic_block bb, basic_block *trace) if (seen (bb) || (e->flags & (EDGE_DFS_BACK | EDGE_COMPLEX)) || find_best_predecessor (bb) != e) break; - if (rtl_dump_file) - fprintf (rtl_dump_file, ",%i [%i]", bb->index, bb->frequency); + if (dump_file) + fprintf (dump_file, ",%i [%i]", bb->index, bb->frequency); trace[i++] = bb; } - if (rtl_dump_file) - fprintf (rtl_dump_file, "\n"); + if (dump_file) + fprintf (dump_file, "\n"); return i; } @@ -287,8 +287,8 @@ tail_duplicate (void) blocks[old->index] = fibheap_insert (heap, -old->frequency, old); - if (rtl_dump_file) - fprintf (rtl_dump_file, "Duplicated %i as %i [%i]\n", + if (dump_file) + fprintf (dump_file, "Duplicated %i as %i [%i]\n", old->index, bb2->index, bb2->frequency); } bb->rbi->next = bb2; @@ -298,12 +298,12 @@ tail_duplicate (void) if (ignore_bb_p (bb)) break; } - if (rtl_dump_file) - fprintf (rtl_dump_file, " covered now %.1f\n\n", + if (dump_file) + fprintf (dump_file, " covered now %.1f\n\n", traced_insns * 100.0 / weighted_insns); } - if (rtl_dump_file) - fprintf (rtl_dump_file, "Duplicated %i insns (%i%%)\n", nduplicated, + if (dump_file) + fprintf (dump_file, "Duplicated %i insns (%i%%)\n", nduplicated, nduplicated * 100 / ninsns); free (blocks); @@ -366,12 +366,12 @@ tracer (void) cfg_layout_initialize (); mark_dfs_back_edges (); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); tail_duplicate (); layout_superblocks (); - if (rtl_dump_file) - dump_flow_info (rtl_dump_file); + if (dump_file) + dump_flow_info (dump_file); cfg_layout_finalize (); /* Merge basic blocks in duplicated traces. */ diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 4f6f3da599a..9ee78d459eb 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -190,8 +190,8 @@ find_values_to_profile (unsigned *n_values, struct histogram_value **values) switch ((*values)[i].type) { case HIST_TYPE_INTERVAL: - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Interval counter for insn %d, range %d -- %d.\n", INSN_UID ((*values)[i].insn), (*values)[i].hdata.intvl.int_start, @@ -203,8 +203,8 @@ find_values_to_profile (unsigned *n_values, struct histogram_value **values) break; case HIST_TYPE_POW2: - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Pow2 counter for insn %d.\n", INSN_UID ((*values)[i].insn)); (*values)[i].n_counters = GET_MODE_BITSIZE ((*values)[i].mode) + @@ -212,16 +212,16 @@ find_values_to_profile (unsigned *n_values, struct histogram_value **values) break; case HIST_TYPE_SINGLE_VALUE: - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Single value counter for insn %d.\n", INSN_UID ((*values)[i].insn)); (*values)[i].n_counters = 3; break; case HIST_TYPE_CONST_DELTA: - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "Constant delta counter for insn %d.\n", INSN_UID ((*values)[i].insn)); (*values)[i].n_counters = 4; @@ -334,11 +334,11 @@ value_profile_transformations (void) if (!maybe_hot_bb_p (BLOCK_FOR_INSN (insn))) continue; - if (rtl_dump_file) + if (dump_file) { - fprintf (rtl_dump_file, "Trying transformations on insn %d\n", + fprintf (dump_file, "Trying transformations on insn %d\n", INSN_UID (insn)); - print_rtl_single (rtl_dump_file, insn); + print_rtl_single (dump_file, insn); } /* Transformations: */ @@ -452,8 +452,8 @@ divmod_fixed_value_transform (rtx insn) if (!rtx_equal_p (op2, value) || 2 * count < all) return false; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Div/mod by constant transformation on insn %d\n", + if (dump_file) + fprintf (dump_file, "Div/mod by constant transformation on insn %d\n", INSN_UID (insn)); e = split_block (BLOCK_FOR_INSN (insn), PREV_INSN (insn)); @@ -568,8 +568,8 @@ mod_pow2_value_transform (rtx insn) if (count < wrong_values) return false; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Mod power of 2 transformation on insn %d\n", + if (dump_file) + fprintf (dump_file, "Mod power of 2 transformation on insn %d\n", INSN_UID (insn)); e = split_block (BLOCK_FOR_INSN (insn), PREV_INSN (insn)); @@ -694,8 +694,8 @@ mod_subtract_transform (rtx insn) if (i == 2) return false; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Mod subtract transformation on insn %d\n", + if (dump_file) + fprintf (dump_file, "Mod subtract transformation on insn %d\n", INSN_UID (insn)); e = split_block (BLOCK_FOR_INSN (insn), PREV_INSN (insn)); diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 2a7e032b84f..38983ec0524 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -1689,11 +1689,11 @@ dump_attrs_list (attrs list) { for (; list; list = list->next) { - print_mem_expr (rtl_dump_file, list->decl); - fprintf (rtl_dump_file, "+"); - fprintf (rtl_dump_file, HOST_WIDE_INT_PRINT_DEC, list->offset); + print_mem_expr (dump_file, list->decl); + fprintf (dump_file, "+"); + fprintf (dump_file, HOST_WIDE_INT_PRINT_DEC, list->offset); } - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "\n"); } /* Print the information about variable *SLOT to dump file. */ @@ -1705,16 +1705,16 @@ dump_variable (void **slot, void *data ATTRIBUTE_UNUSED) int i; location_chain node; - fprintf (rtl_dump_file, " name: %s\n", + fprintf (dump_file, " name: %s\n", IDENTIFIER_POINTER (DECL_NAME (var->decl))); for (i = 0; i < var->n_var_parts; i++) { - fprintf (rtl_dump_file, " offset %ld\n", + fprintf (dump_file, " offset %ld\n", (long) var->var_part[i].offset); for (node = var->var_part[i].loc_chain; node; node = node->next) { - fprintf (rtl_dump_file, " "); - print_rtl_single (rtl_dump_file, node->loc); + fprintf (dump_file, " "); + print_rtl_single (dump_file, node->loc); } } @@ -1729,7 +1729,7 @@ dump_vars (htab_t vars) { if (htab_elements (vars) > 0) { - fprintf (rtl_dump_file, "Variables:\n"); + fprintf (dump_file, "Variables:\n"); htab_traverse (vars, dump_variable, NULL); } } @@ -1741,19 +1741,19 @@ dump_dataflow_set (dataflow_set *set) { int i; - fprintf (rtl_dump_file, "Stack adjustment: "); - fprintf (rtl_dump_file, HOST_WIDE_INT_PRINT_DEC, set->stack_adjust); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "Stack adjustment: "); + fprintf (dump_file, HOST_WIDE_INT_PRINT_DEC, set->stack_adjust); + fprintf (dump_file, "\n"); for (i = 1; i < FIRST_PSEUDO_REGISTER; i++) { if (set->regs[i]) { - fprintf (rtl_dump_file, "Reg %d:", i); + fprintf (dump_file, "Reg %d:", i); dump_attrs_list (set->regs[i]); } } dump_vars (set->vars); - fprintf (rtl_dump_file, "\n"); + fprintf (dump_file, "\n"); } /* Print the IN and OUT sets for each basic block to dump file. */ @@ -1765,10 +1765,10 @@ dump_dataflow_sets (void) FOR_EACH_BB (bb) { - fprintf (rtl_dump_file, "\nBasic block %d:\n", bb->index); - fprintf (rtl_dump_file, "IN:\n"); + fprintf (dump_file, "\nBasic block %d:\n", bb->index); + fprintf (dump_file, "IN:\n"); dump_dataflow_set (&VTI (bb)->in); - fprintf (rtl_dump_file, "OUT:\n"); + fprintf (dump_file, "OUT:\n"); dump_dataflow_set (&VTI (bb)->out); } } @@ -2627,10 +2627,10 @@ variable_tracking_main (void) vt_find_locations (); vt_emit_notes (); - if (rtl_dump_file) + if (dump_file) { dump_dataflow_sets (); - dump_flow_info (rtl_dump_file); + dump_flow_info (dump_file); } vt_finalize (); diff --git a/gcc/web.c b/gcc/web.c index d20bcfbdfed..f27376b9b5d 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -191,16 +191,16 @@ entry_register (struct web_entry *entry, struct ref *ref, char *used, else if (REG_USERVAR_P (reg) && 0/*&& !flag_messy_debugging*/) { newreg = reg; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "New web forced to keep reg=%i (user variable)\n", REGNO (reg)); } else if (use_addressof [REGNO (reg)]) { newreg = reg; - if (rtl_dump_file) - fprintf (rtl_dump_file, + if (dump_file) + fprintf (dump_file, "New web forced to keep reg=%i (address taken)\n", REGNO (reg)); } @@ -212,8 +212,8 @@ entry_register (struct web_entry *entry, struct ref *ref, char *used, REG_LOOP_TEST_P (newreg) = REG_LOOP_TEST_P (reg); RTX_UNCHANGING_P (newreg) = RTX_UNCHANGING_P (reg); REG_ATTRS (newreg) = REG_ATTRS (reg); - if (rtl_dump_file) - fprintf (rtl_dump_file, "Web oldreg=%i newreg=%i\n", REGNO (reg), + if (dump_file) + fprintf (dump_file, "Web oldreg=%i newreg=%i\n", REGNO (reg), REGNO (newreg)); } @@ -231,8 +231,8 @@ replace_ref (struct ref *ref, rtx reg) if (oldreg == reg) return; - if (rtl_dump_file) - fprintf (rtl_dump_file, "Updating insn %i (%i->%i)\n", + if (dump_file) + fprintf (dump_file, "Updating insn %i (%i->%i)\n", INSN_UID (DF_REF_INSN (ref)), REGNO (oldreg), REGNO (reg)); *loc = reg; } @@ -274,8 +274,8 @@ web_main (void) used = (char *) xcalloc (max, sizeof (char)); use_addressof = (char *) xcalloc (max, sizeof (char)); - if (rtl_dump_file) - df_dump (df, DF_UD_CHAIN | DF_DU_CHAIN, rtl_dump_file); + if (dump_file) + df_dump (df, DF_UD_CHAIN | DF_DU_CHAIN, dump_file); /* Produce the web. */ for (i = 0; i < df->n_uses; i++) |