<0,2>. */
basic_block bb;
struct function *my_function = DECL_STRUCT_FUNCTION (node->decl);
- int freq;
+ sreal freq;
struct ipa_fn_summary *info = ipa_fn_summaries->get (node);
predicate bb_predicate;
struct ipa_func_body_info fbi;
for (n = 0; n < nblocks; n++)
{
bb = BASIC_BLOCK_FOR_FN (cfun, order[n]);
- freq = compute_call_stmt_bb_frequency (node->decl, bb);
+ freq = bb->count.to_sreal_scale (ENTRY_BLOCK_PTR_FOR_FN (cfun)->count);
if (clobber_only_eh_bb_p (bb))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " ");
print_gimple_stmt (dump_file, stmt, 0);
fprintf (dump_file, "\t\tfreq:%3.2f size:%3i time:%3i\n",
- ((double) freq) / CGRAPH_FREQ_BASE, this_size,
+ freq.to_double (), this_size,
this_time);
}
will_be_nonconstant = true;
if (this_time || this_size)
{
- this_time *= freq;
+ sreal final_time = (sreal)this_time * freq;
prob = eliminated_by_inlining_prob (stmt);
if (prob == 1 && dump_file && (dump_flags & TDF_DETAILS))
if (*(is_gimple_call (stmt) ? &bb_predicate : &p) != false)
{
- time += this_time;
+ time += final_time;
size += this_size;
}
{
predicate ip = bb_predicate & predicate::not_inlined ();
info->account_size_time (this_size * prob,
- (sreal)(this_time * prob)
- / (CGRAPH_FREQ_BASE * 2), ip,
+ (this_time * prob) / 2, ip,
p);
}
if (prob != 2)
info->account_size_time (this_size * (2 - prob),
- (sreal)(this_time * (2 - prob))
- / (CGRAPH_FREQ_BASE * 2),
+ (this_time * (2 - prob) / 2),
bb_predicate,
p);
}
}
}
set_hint_predicate (&ipa_fn_summaries->get (node)->array_index, array_index);
- time = time / CGRAPH_FREQ_BASE;
free (order);
if (nonconstant_names.exists () && !early)