http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58555

--- Comment #20 from Jan Hubicka <hubicka at ucw dot cz> ---
> That part is pretty obvious.  What I wanted to look at is how we got there and
> did it make any sense to be in that code with a caller frequency of zero.

Recursive inliner will happily call the predicate on every recursive call it is
given.  Usually we do not get there, because in those cases we get
!cgraph_maybe_hot_edge_p

That predicate however can be convinced to return true even for calls with
0 frequency if profile feedback says there are stil many counts or if user
drops hot attribute on the outer function. (Theresa made this code to depends
on edge historgram and in some cases it may behave in funy ways).
So check is needed.

Question remains why this reproduces on testcase without profile feedback & hot
attribute.  I assume that because roundoff error We have A inlined in B with
call frequency 0 while A still have callees with non-zero frequency because it
contains a loop.  It is apparently what happens here, will double check.

Reply via email to