[all-commits] [llvm/llvm-project] 96b5cc: [BPI] Add getEdgeProbabilitiesFromWeights (NFC). (...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Sep 26 02:15:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96b5cc3d836494c56c8d5ae1e73e90864eb19a5d
      https://github.com/llvm/llvm-project/commit/96b5cc3d836494c56c8d5ae1e73e90864eb19a5d
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-09-26 (Sat, 26 Sep 2026)

  Changed paths:
    M llvm/include/llvm/Analysis/BranchProbabilityInfo.h
    M llvm/lib/Analysis/BranchProbabilityInfo.cpp

  Log Message:
  -----------
  [BPI] Add getEdgeProbabilitiesFromWeights (NFC). (#226560)

Move computing edge probabilities from branch weights to a static
helper. This allows re-using the core logic when computing execution
frequencies in VPlan, fixing a number of subtle differences.

While touching the code, also modernize the code slightly.

Note that the helper does not handle the case where all successors are
unreachable. This would need additional info and is not needed for the
VPlan case.

PR: https://github.com/llvm/llvm-project/pull/226560



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