[all-commits] [llvm/llvm-project] 051f2c: [SamplePGO] Skip inlinee profile scaling for sampl...

WenleiHe via All-commits all-commits at lists.llvm.org
Thu Mar 11 10:18:56 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 051f2c144e1eee5ed94cc478075a64ee2d0f2745
      https://github.com/llvm/llvm-project/commit/051f2c144e1eee5ed94cc478075a64ee2d0f2745
  Author: Wenlei He <aktoon at gmail.com>
  Date:   2021-03-11 (Thu, 11 Mar 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/Cloning.h
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    M llvm/lib/Transforms/Utils/InlineFunction.cpp

  Log Message:
  -----------
  [SamplePGO] Skip inlinee profile scaling for sample loader inlining

For CGSCC inline, we need to scale down a function's branch weights and entry counts when thee it's inlined at a callsite. This is done through updateCallProfile. Additionally, we also scale the weigths for the inlined clone based on call site count in updateCallerBFI. Neither is needed for inlining during sample profile loader as it's using context profile that is separated from inlinee's own profile. This change skip the inlinee profile scaling for sample loader inlining.

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




More information about the All-commits mailing list