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
13 lines
145 B
Plaintext
13 lines
145 B
Plaintext
foo:12345:1000
|
|
1: 1000
|
|
2.1: 1000
|
|
15: 5000
|
|
4: bar:1000
|
|
1: 1000
|
|
2: goo:3000
|
|
1: 3000
|
|
8: bar:40000
|
|
1: 10000
|
|
2: goo:30000
|
|
1: 30000
|