[all-commits] [llvm/llvm-project] 764a4f: [BOLT] Fixed BOLT edge weight estimation in non-LB...

AJMullen via All-commits all-commits at lists.llvm.org
Fri Sep 11 02:10:05 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 764a4f4176bdebb5b8aa1ad9a4c4c8b46de85b2d
      https://github.com/llvm/llvm-project/commit/764a4f4176bdebb5b8aa1ad9a4c4c8b46de85b2d
  Author: AJMullen <andreas.mullen at arm.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M bolt/lib/Passes/MCF.cpp
    A bolt/test/AArch64/edge-weight-estimation-fixes.s

  Log Message:
  -----------
  [BOLT] Fixed BOLT edge weight estimation in non-LBR mode. (#222538)

Before: When estimating edge weights within `computeEdgeWeights` in
`MCF.cpp`, if the `TotalChildrenCount` is 0, the default edge weight is
`1 / (GraphT::child_end(BB)_ - GraphT::child_begin(BB))` resulting in
integer division and incorrect distribution of estimated edge weights.

After: Correctly estimate edge weights with zero and non-zero values of
`TotalChildrenCount` by enforcing floating point division.

---------

Co-authored-by: Thrrreeee <shijinrui at bytedance.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list