[llvm] MachineBlockPlacement: Add tolerance to comparisons (PR #67197)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 11:30:26 PDT 2023


spupyrev wrote:

> The block counts are not available. We only have a single count for function entry and branch-weights. Functions like MachineBlockFrequencyInfo::getBlockProfileCount will just "emulate" it by multiplying the entry count with the block frequency (that was in turn estimated from the branch weights). So the information in the counts isn't any better than the frequencies for this use-case.

That's exactly what i'm asking: Why not using the "emulated/estimated" counts? You get the same rounding effect, as suggested in the diff, but in addition the raw counts have an intuitive interpretation ("how many times a block/jump was executed?"). 
We can separately work on making this estimation more precise, if it's not already good enough.

https://github.com/llvm/llvm-project/pull/67197


More information about the llvm-commits mailing list