https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106896

--- Comment #10 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The problem the assert is trying to solve is that local counters are all
frequencies relative to the entry block count, while IPA counters are absolute
values within the whole program. So comparing them mixes apples and oranges.

Normally if function has IPA profile, all counts within the function body
should be IPA.  Problem here is that this that we propagated the fact that
function always callls cold function into the entry block but somehow we mark
the first basic block as estimated locally which does not make sense.

This is inconsistency coming from updates after pcom.
We need to live with inconsistent profiles (since it is not always possible to
make them fully right) so I will patch to_sreal to simply give up and return 1
here.  That is what we do for unknown probabilities.

Reply via email to