bool
maybe_hot_bb_p (const_basic_block bb)
{
- return maybe_hot_count_p (bb->count) && maybe_hot_frequency_p (bb->frequency);
+ if (profile_status == PROFILE_READ)
+ return maybe_hot_count_p (bb->count);
+ return maybe_hot_frequency_p (bb->frequency);
}
/* Return true if the call can be hot. */
bool
maybe_hot_edge_p (edge e)
{
- return maybe_hot_count_p (e->count) && maybe_hot_frequency_p (EDGE_FREQUENCY (e));
+ if (profile_status == PROFILE_READ)
+ return maybe_hot_count_p (e->count);
+ return maybe_hot_frequency_p (EDGE_FREQUENCY (e));
}
/* Return true in case BB is probably never executed. */
basic_block bb;
sreal freq_max;
- if (!flag_branch_probabilities || !counts_to_freqs ())
+ if (cfun->function_frequency != PROFILE_READ || !counts_to_freqs ())
{
static int real_values_initialized = 0;