[all-commits] [llvm/llvm-project] 21ba91: [SamplePGO] Add a cutoff for number of profile mat...

Krzysztof Pszeniczny via All-commits all-commits at lists.llvm.org
Mon Jun 17 10:51:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 21ba91c43902c25bfd55cc03fd245c3fe274717b
      https://github.com/llvm/llvm-project/commit/21ba91c43902c25bfd55cc03fd245c3fe274717b
  Author: Krzysztof Pszeniczny <kpszeniczny at google.com>
  Date:   2024-06-17 (Mon, 17 Jun 2024)

  Changed paths:
    M llvm/lib/Transforms/IPO/SampleProfileMatcher.cpp
    M llvm/test/Transforms/SampleProfile/pseudo-probe-stale-profile-matching-LCS.ll

  Log Message:
  -----------
  [SamplePGO] Add a cutoff for number of profile matching anchors (#95542)

The algorithm added by PR #87375 can be potentially quadratic in the
number of anchors. This is almost never a problem because normally
functions have a reasonable number of function calls.

However, in some rare cases of auto-generated code we observed very
large functions that trigger quadratic behaviour here (resulting in
>130GB of peak heap memory usage for clang). Let's add a knob for
controlling the max number of callsites in a function above which stale
profile matching won't be performed.



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