https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106896
--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- (In reply to Martin Liška from comment #3) > I think you may want to use something like: > bb->count.probability_in (ENTRY_BLOCK_PTR_FOR_FN (cfun)->count).to_sreal() I'm not sure modelling it as a probability would work. In general, a bb can be executed more often than the entry block (e.g. for loops) or less often (e.g. if the whole function is a diamond). Modelling it as a probability would cap one of the two cases to 1 (i.e. same as equal counts).