llvm-project/llvm/tools/llvm-profdata
Rong Xu 077baefc99 [llvm-profdata] Use flattening sample profile in profile supplementation
We need to flatten the SampleFDO profile in profile supplementation
because the InstrFDO profile does not have inlined callsite counters.
Without flattening profile, FDO optimizations are not stable:
we will not supplement the second generation profile when the modified
functions are all inlined.

This patch fixes this issue: we will flatten the profile for functions
that appears in FDO profile.

Note that we only need to find the hot/warm functions in SampleFDO
profile, so we will not perform a full flatten. We will use
a DFS traversal to compute the accumulated entry count and max bodycount.
This is much cheaper than full flattening.

Differential Revision: https://reviews.llvm.org/D138893
2022-11-29 22:23:47 -08:00
..
CMakeLists.txt [llvm-driver] Add various tools to the llvm-driver 2022-10-06 05:16:13 +00:00
llvm-profdata.cpp [llvm-profdata] Use flattening sample profile in profile supplementation 2022-11-29 22:23:47 -08:00