+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.
{
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;
}
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);
}
}
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
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;
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. */
/* 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,
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);
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);
}
&& 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;
}
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);
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;
}
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);
}
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);
}
}
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;
{
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);
}
}
- 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);
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);
}
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 ();
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);
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));
}
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
SET_HARD_REG_BIT (btrs_live_at_end[i], regno);
}
- if (rtl_dump_file)
+ if (dump_file)
dump_btrs_live(i);
}
}
/* 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);
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);
}
{
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);
}
});
{
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);
});
}
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;
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)
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));
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);
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. */
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;
}
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;
}
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)
/* 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");
}
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;
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,
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);
}
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
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)
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;
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. */
/* 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. */
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;
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);
}
}
- 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;
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);
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);
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);
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);
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);
}
&& (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);
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);
}
/* 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);
}
}
}
}
- 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;
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;
}
}
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);
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;
/* 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. */
{
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))
{
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)));
}
}
- 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)
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;
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;
}
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);
&& 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;
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;
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);
}
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);
{
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)
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. */
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])),
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);
}
}
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>");
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;
}
/* 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;
}
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;
}
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)]);
}
{
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
}
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);
}
}
_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)
{
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
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 ();
}
}
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);
}
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);
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 ();
}
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 ();
}
/* 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 ();
}
}
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;
}
}
}
}
- 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;
}
&& (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);
#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! */
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;
}
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",
? (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
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);
}
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);
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);
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)
}
#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 ();
}
/* 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);
}
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))
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;
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;
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)
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;
}
}
{
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;
}
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;
}
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;
}
*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;
}
}
- 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);
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);
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;
}
/* 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;
/* 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;
}
{
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;
}
|| !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;
}
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;
}
/* 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;
}
|| 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;
}
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)
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))
/* 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;
}
/* 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;
}
}
}
- 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);
}
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);
/* 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
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
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. */
/* 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;
}
/* 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;
}
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);
}
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));
}
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;
/* 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;
}
/* 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;
}
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;
}
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;
}
{
/* 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;
}
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);
}
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. */
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))
/* 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;
}
/* 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;
}
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;
}
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;
}
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);
}
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));
}
/* 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;
}
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);
/* 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. */
{
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
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
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;
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++);
}
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;
}
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;
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
}
}
}
- 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. */
}
}
- 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);
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 ();
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);
}
}
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. */
/* 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);
}
&& !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);
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);
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);
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);
}
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);
void
ra_colorize_graph (struct df *df)
{
- if (rtl_dump_file)
+ if (dump_file)
dump_igraph (df);
build_worklists (df);
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);
}
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++)
{
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);
{
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)
{
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;
{
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");
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);
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))
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. */
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);
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. */
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. */
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. */
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.
/* 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
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. */
/* 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);
}
/*
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);
}
}
- 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);
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,
{
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]);
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
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;
}
}
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;
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;
{
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;
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
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;
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);
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]);
}
}
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
" 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 },
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
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)"
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);
}
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);
}
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);
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))
reg_alloc ();
timevar_pop (TV_LOCAL_ALLOC);
- if (dump_file[DFI_lreg].enabled)
+ if (dump_file_tbl[DFI_lreg].enabled)
{
timevar_push (TV_DUMP);
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);
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);
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);
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);
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);
/* 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);
}
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);
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);
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);
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);
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)
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));
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
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);
{
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);
}
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;
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);
#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
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))
/* 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);
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
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 ());
{
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);
{
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);
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
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 ();
}
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)
{
(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. */
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 ();
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 ();
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));
{
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);
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);
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));
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);
{
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;
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;
}
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);
}
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);
}
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)
{
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. */
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;
}
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;
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);
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. */
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,
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) +
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;
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: */
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));
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));
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));
{
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. */
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);
}
}
{
if (htab_elements (vars) > 0)
{
- fprintf (rtl_dump_file, "Variables:\n");
+ fprintf (dump_file, "Variables:\n");
htab_traverse (vars, dump_variable, NULL);
}
}
{
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. */
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);
}
}
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 ();
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));
}
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));
}
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;
}
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++)