[all-commits] [llvm/llvm-project] d22c5d: [llvm-profdata] Adjust profile supplementation heu...

xur-llvm via All-commits all-commits at lists.llvm.org
Mon Aug 29 14:34:17 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d22c5d0f5520e2bf24f04e724157a06765eb7a0a
      https://github.com/llvm/llvm-project/commit/d22c5d0f5520e2bf24f04e724157a06765eb7a0a
  Author: Rong Xu <xur at google.com>
  Date:   2022-08-29 (Mon, 29 Aug 2022)

  Changed paths:
    A llvm/test/tools/llvm-profdata/Inputs/mix_instr_small.proftext
    M llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
    M llvm/tools/llvm-profdata/llvm-profdata.cpp

  Log Message:
  -----------
  [llvm-profdata] Adjust profile supplementation heuristics

1) We now use the count size in FDO as the main factor to deal with pre-inliner.
Currently we use the number of sample records in the SampleFDO profile. But
that only counts the top-level body sample records (not including the nested
call-sites). We are seeing some big functions not being updated because of
this. I think using the count size in FDO profile is more reasonable to judge if
the function is likely to be inlined to the callers in pre-inliner.

(2) We use getMaxCount in SampleFDO rather the HeadSample to determine if
if the function is hot in SampleFDO. This is in-sync with the logic
in the compiler (also HeadSample can be 0).

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




More information about the All-commits mailing list