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
33 lines
261 B
Plaintext
33 lines
261 B
Plaintext
# IR level Instrumentation Flag
|
|
:ir
|
|
# Always instrument the function entry block
|
|
:entry_first
|
|
foo
|
|
# Func Hash:
|
|
1111
|
|
# Num Counters:
|
|
5
|
|
# Counter Values:
|
|
10000
|
|
50
|
|
2000
|
|
40
|
|
6000
|
|
|
|
bar.cc:bar
|
|
# Func Hash:
|
|
2222
|
|
# Num Counters:
|
|
10
|
|
# Counter Values:
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|