aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2022-11-29 22:23:47 -0800
committerRong Xu <xur@google.com>2022-11-29 22:23:47 -0800
commit077baefc998dd55ba1b91d9c9e284ce5a8e0216e (patch)
tree7c4d7afa58a9e1137f795ca6a24e31627e91a6e1 /llvm/lib/CodeGen/CodeGen.cpp
parentdabd2391765154848d35f172fbbeb68c88ff9dd4 (diff)
downloadllvm-077baefc998dd55ba1b91d9c9e284ce5a8e0216e.zip
llvm-077baefc998dd55ba1b91d9c9e284ce5a8e0216e.tar.gz
llvm-077baefc998dd55ba1b91d9c9e284ce5a8e0216e.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions