[all-commits] [llvm/llvm-project] 240b73: [SimplifyCFG][PGO] Reuse existing `setBranchWeight...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Wed Oct 1 09:54:53 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 240b73e10f5c6549776cfd3847db2be14dc42776
      https://github.com/llvm/llvm-project/commit/240b73e10f5c6549776cfd3847db2be14dc42776
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2025-10-01 (Wed, 01 Oct 2025)

  Changed paths:
    M llvm/include/llvm/IR/Instructions.h
    M llvm/include/llvm/IR/ProfDataUtils.h
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/IR/ProfDataUtils.cpp
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    M llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/utils/profcheck-xfail.txt

  Log Message:
  -----------
  [SimplifyCFG][PGO] Reuse existing `setBranchWeights` (#160629)

The main difference between SimplifyCFG's `setBranchWeights`​ and the ProfDataUtils' is that the former doesn't propagate all-zero weights. That seems like a sensible thing to do, so updated the latter accordingly, and added a flag to control the behavior.

Also moved to ProfDataUtils the logic fitting 64-bit weights to 32-bit.

As side-effect, this fixes some profcheck failures.



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