+2019-11-14 Jan Hubicka <hubicka@ucw.cz>
+
+ * ipa-fnsummary.c (ipa_call_context::estimate_size_and_time,
+ ipa_merge_fn_summary_after_inlining): Micro optimize.
+
2019-11-14 Jan Hubicka <hubicka@ucw.cz>
* params.opt (max-inline-insns-single-O2): Set to 70 (instead of 30).
m_inline_param_summary);
gcc_checking_assert (prob >= 0);
gcc_checking_assert (prob <= REG_BR_PROB_BASE);
- time += e->time * prob / REG_BR_PROB_BASE;
+ if (prob == REG_BR_PROB_BASE)
+ time += e->time;
+ else
+ time += e->time * prob / REG_BR_PROB_BASE;
}
gcc_checking_assert (time >= 0);
}
sreal add_time = ((sreal)e->time * freq);
int prob = e->nonconst_predicate.probability (callee_info->conds,
clause, es->param);
- add_time = add_time * prob / REG_BR_PROB_BASE;
+ if (prob != REG_BR_PROB_BASE)
+ add_time = add_time * prob / REG_BR_PROB_BASE;
if (prob != REG_BR_PROB_BASE
&& dump_file && (dump_flags & TDF_DETAILS))
{