[llvm] MachineBlockPlacement: Add tolerance to comparisons (PR #67197)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 11:19:53 PDT 2023
MatzeB wrote:
> I wonder why the existing implementation of block placement relies on block frequencies (that are relative to the entry block) instead of block counts? Would using counts be equivalent (or very similar) to the rounding suggested in the diff?
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.
https://github.com/llvm/llvm-project/pull/67197
More information about the llvm-commits
mailing list