aboutsummaryrefslogtreecommitdiff
path: root/gcc/tracer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tracer.c')
-rw-r--r--gcc/tracer.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/tracer.c b/gcc/tracer.c
index f3e401b..58caf13 100644
--- a/gcc/tracer.c
+++ b/gcc/tracer.c
@@ -179,7 +179,7 @@ find_best_predecessor (basic_block bb)
if (!best || ignore_bb_p (best->src))
return NULL;
if (EDGE_FREQUENCY (best) * REG_BR_PROB_BASE
- < bb->frequency * branch_ratio_cutoff)
+ < bb->count.to_frequency (cfun) * branch_ratio_cutoff)
return NULL;
return best;
}
@@ -194,7 +194,7 @@ find_trace (basic_block bb, basic_block *trace)
edge e;
if (dump_file)
- fprintf (dump_file, "Trace seed %i [%i]", bb->index, bb->frequency);
+ fprintf (dump_file, "Trace seed %i [%i]", bb->index, bb->count.to_frequency (cfun));
while ((e = find_best_predecessor (bb)) != NULL)
{
@@ -203,11 +203,11 @@ find_trace (basic_block bb, basic_block *trace)
|| find_best_successor (bb2) != e)
break;
if (dump_file)
- fprintf (dump_file, ",%i [%i]", bb->index, bb->frequency);
+ fprintf (dump_file, ",%i [%i]", bb->index, bb->count.to_frequency (cfun));
bb = bb2;
}
if (dump_file)
- fprintf (dump_file, " forward %i [%i]", bb->index, bb->frequency);
+ fprintf (dump_file, " forward %i [%i]", bb->index, bb->count.to_frequency (cfun));
trace[i++] = bb;
/* Follow the trace in forward direction. */
@@ -218,7 +218,7 @@ find_trace (basic_block bb, basic_block *trace)
|| find_best_predecessor (bb) != e)
break;
if (dump_file)
- fprintf (dump_file, ",%i [%i]", bb->index, bb->frequency);
+ fprintf (dump_file, ",%i [%i]", bb->index, bb->count.to_frequency (cfun));
trace[i++] = bb;
}
if (dump_file)
@@ -282,11 +282,11 @@ tail_duplicate (void)
{
int n = count_insns (bb);
if (!ignore_bb_p (bb))
- blocks[bb->index] = heap.insert (-bb->frequency, bb);
+ blocks[bb->index] = heap.insert (-bb->count.to_frequency (cfun), bb);
counts [bb->index] = n;
ninsns += n;
- weighted_insns += n * bb->frequency;
+ weighted_insns += n * bb->count.to_frequency (cfun);
}
if (profile_info && profile_status_for_fn (cfun) == PROFILE_READ)
@@ -314,7 +314,7 @@ tail_duplicate (void)
n = find_trace (bb, trace);
bb = trace[0];
- traced_insns += bb->frequency * counts [bb->index];
+ traced_insns += bb->count.to_frequency (cfun) * counts [bb->index];
if (blocks[bb->index])
{
heap.delete_node (blocks[bb->index]);
@@ -330,7 +330,7 @@ tail_duplicate (void)
heap.delete_node (blocks[bb2->index]);
blocks[bb2->index] = NULL;
}
- traced_insns += bb2->frequency * counts [bb2->index];
+ traced_insns += bb2->count.to_frequency (cfun) * counts [bb2->index];
if (EDGE_COUNT (bb2->preds) > 1
&& can_duplicate_block_p (bb2)
/* We have the tendency to duplicate the loop header
@@ -345,11 +345,11 @@ tail_duplicate (void)
/* Reconsider the original copy of block we've duplicated.
Removing the most common predecessor may make it to be
head. */
- blocks[bb2->index] = heap.insert (-bb2->frequency, bb2);
+ blocks[bb2->index] = heap.insert (-bb2->count.to_frequency (cfun), bb2);
if (dump_file)
fprintf (dump_file, "Duplicated %i as %i [%i]\n",
- bb2->index, copy->index, copy->frequency);
+ bb2->index, copy->index, copy->count.to_frequency (cfun));
bb2 = copy;
changed = true;