[all-commits] [llvm/llvm-project] 229987: [SamplePGO] Keeping prof metadata for IndirectBrInst

WenleiHe via All-commits all-commits at lists.llvm.org
Tue Mar 30 10:46:32 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 22998738e8f78b447b04a7fd23efa4deaeda306b
      https://github.com/llvm/llvm-project/commit/22998738e8f78b447b04a7fd23efa4deaeda306b
  Author: spupyrev <spupyrev at fb.com>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:
    M llvm/lib/IR/Metadata.cpp
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    A llvm/test/Transforms/SampleProfile/Inputs/pseudo-probe-profile-metadata.prof
    A llvm/test/Transforms/SampleProfile/pseudo-probe-profile-metadata.ll

  Log Message:
  -----------
  [SamplePGO] Keeping prof metadata for IndirectBrInst

Currently prof metadata with branch counts is added only for BranchInst and SwitchInst, but not for IndirectBrInst. As a result, BPI/BFI make incorrect inferences for indirect branches, which can be very hot.
This diff adds metadata for IndirectBrInst, in addition to BranchInst and SwitchInst.

Reviewed By: wmi, wenlei

Differential Revision: https://reviews.llvm.org/D99550




More information about the All-commits mailing list