1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00
llvm-mirror/lib/ProfileData
Wenlei He 93a5ec7e97 [CSSPGO] Load context profile for external functions in PreLink and populate ThinLTO import list
For ThinLTO's prelink compilation, we need to put external inline candidates into an import list attached to function's entry count metadata. This enables ThinLink to treat such cross module callee as hot in summary index, and later helps postlink to import them for profile guided cross module inlining.

For AutoFDO, the import list is retrieved by traversing the nested inlinee functions. For CSSPGO, since profile is flatterned, a few things need to happen for it to work:

 - When loading input profile in extended binary format, we need to load all child context profile whose parent is in current module, so context trie for current module includes potential cross module inlinee.
 - In order to make the above happen, we need to know whether input profile is CSSPGO profile before start reading function profile, hence a flag for profile summary section is added.
 - When searching for cross module inline candidate, we need to walk through the context trie instead of nested inlinee profile (callsite sample of AutoFDO profile).
 - Now that we have more accurate counts with CSSPGO, we swtiched to use entry count instead of total count to decided if an external callee is potentially beneficial to inline. This make it consistent with how we determine whether call tagert is potential inline candidate.

Differential Revision: https://reviews.llvm.org/D98590
2021-03-15 12:22:15 -07:00
..
Coverage Revert "[llvm-cov] reset executation count to 0 after wrapped segment" 2021-03-09 14:47:32 -08:00
CMakeLists.txt Revert "[SampleFDO][NFC] Refactor SampleProfile.cpp" 2021-02-16 22:11:42 +00:00
GCOV.cpp [ProfileData] GCOVFile::readGCNO - silence undefined pointer warning. NFCI. 2021-01-04 16:50:05 +00:00
InstrProf.cpp [IndirectCallPromotion] Recommit "Don't strip ".__uniq." suffix when it strips 2021-03-12 13:48:14 -08:00
InstrProfReader.cpp [PGO] Supporting code for always instrumenting entry block 2020-07-22 15:01:53 -07:00
InstrProfWriter.cpp [llvm-profdata] Emit Error when Invalid MemOpSize Section is Created by llvm-profdata 2021-02-23 12:51:54 -08:00
ProfileSummaryBuilder.cpp [CSSPGO] Use merged base profile for hot threshold calculation 2021-02-05 17:51:00 -08:00
SampleProf.cpp [SampleFDO] Support enabling -funique-internal-linkage-name. 2021-03-09 21:41:40 -08:00
SampleProfReader.cpp [CSSPGO] Load context profile for external functions in PreLink and populate ThinLTO import list 2021-03-15 12:22:15 -07:00
SampleProfWriter.cpp [CSSPGO] Load context profile for external functions in PreLink and populate ThinLTO import list 2021-03-15 12:22:15 -07:00