[all-commits] [llvm/llvm-project] 6d5132: [CSSPGO] Fix incorrect probe distribution factor c...

ictwanglei via All-commits all-commits at lists.llvm.org
Wed Apr 7 08:49:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d5132b426fbe23c5bc3e591ca2ca09a315d459b
      https://github.com/llvm/llvm-project/commit/6d5132b426fbe23c5bc3e591ca2ca09a315d459b
  Author: wlei <wlei at fb.com>
  Date:   2021-04-07 (Wed, 07 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/SampleProfile.cpp
    A llvm/test/Transforms/SampleProfile/Inputs/pseudo-probe-icp-factor.prof
    A llvm/test/Transforms/SampleProfile/pseudo-probe-icp-factor.ll

  Log Message:
  -----------
  [CSSPGO] Fix incorrect probe distribution factor computation in top-down inliner

We see a regression related to low probe factor(0.01) which prevents some callsites being promoted in ICPPass and later cause the missing inline in CGSCC inliner. The root cause is due to redundant(the second) multiplication of the probe factor and this change try to fix it.

`Sum` does multiply a factor right after findCallSamples but later when using as the parameter in setProbeDistributionFactor, it multiplies one again.

This change could get ~2% perf back on mcf benchmark. In mcf, previously the corresponding factor is 1 and it's the recent feature introducing the <1 factor then trigger this bug.

Reviewed By: hoy, wenlei

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




More information about the All-commits mailing list