[all-commits] [llvm/llvm-project] 910e53: [SimplifyCFG][profcheck] Synthesize profile for `b...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Fri Oct 3 20:01:19 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 910e536fb09f39493906005b9a8d7d1fbcc20e28
      https://github.com/llvm/llvm-project/commit/910e536fb09f39493906005b9a8d7d1fbcc20e28
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/switch_create.ll

  Log Message:
  -----------
  [SimplifyCFG][profcheck] Synthesize profile for `br (X == 0 | X == 1), T, F1 -> switch` (#161549)

We cannot calculate the weights of the switch precisely, but we do know the probability of the default branch. We then split equally the remaining probability over the rest of the cases. If we did nothing, the static estimation could be considerably poorer.



Issue #147390



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