Commit 35d93d1d by Jan Hubicka Committed by Jan Hubicka

ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls with zero counts.


	* ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
	with zero counts.

From-SVN: r257020
parent 0976f13b
2018-01-24 Jan Hubicka <hubicka@ucw.cz>
* ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
with zero counts.
2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
......
......@@ -331,16 +331,14 @@ ipa_propagate_frequency_1 (struct cgraph_node *node, void *data)
it is executed by the train run. Transfer the function only if all
callers are unlikely executed. */
if (profile_info
&& edge->callee->count.initialized_p ()
/* Thunks are not profiled. This is more or less implementation
bug. */
&& !d->function_symbol->thunk.thunk_p
&& !(edge->callee->count.ipa () == profile_count::zero ())
&& (edge->caller->frequency != NODE_FREQUENCY_UNLIKELY_EXECUTED
|| (edge->caller->global.inlined_to
&& edge->caller->global.inlined_to->frequency
!= NODE_FREQUENCY_UNLIKELY_EXECUTED)))
d->maybe_unlikely_executed = false;
if (edge->count.initialized_p () && !edge->count.nonzero_p ())
if (edge->count.ipa ().initialized_p ()
&& !edge->count.ipa ().nonzero_p ())
continue;
switch (edge->caller->frequency)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment