mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
3e6a01ab89
This patch fixed the following issues along side with some refactoring: 1. Fix bugs where StringRef for context string out live the underlying std::string. We now keep string table in profile generator to hold std::strings. We also do the same for bracketed context strings in profile writer. 2. Make sure profile output strictly follow (total sample, name) order. Previously, there's inconsistency between ProfileMap's key and FunctionSamples's name, leading to inconsistent ordering. This is now fixed by introducing context profile canonicalization. Assertions are also added to make sure ProfileMap's key and FunctionSamples's name are always consistent. 3. Enhanced error handling for profile writing to make sure we bubble up errors properly for both llvm-profgen and llvm-profdata when string table is not populated correctly for extended binary profile. 4. Keep all internal context representation bracket free. This avoids creating new strings for context trimming, merging and preinline. getNameWithContext API is now simplied accordingly. 5. Factor out the code for context trimming and merging into SampleContextTrimmer in SampleProf.cpp. This enables llvm-profdata to use the trimmer when merging profiles. Changes in llvm-profgen will be in separate patch. Differential Revision: https://reviews.llvm.org/D100090 |
||
---|---|---|
.. | ||
CallContext.h | ||
CMakeLists.txt | ||
CSPreInliner.cpp | ||
CSPreInliner.h | ||
ErrorHandling.h | ||
llvm-profgen.cpp | ||
PerfReader.cpp | ||
PerfReader.h | ||
ProfiledBinary.cpp | ||
ProfiledBinary.h | ||
ProfileGenerator.cpp | ||
ProfileGenerator.h | ||
PseudoProbe.cpp | ||
PseudoProbe.h |