1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00
llvm-mirror/tools
Wenlei He 3e6a01ab89 [CSSPGO] Fix dangling context strings and improve profile order consistency and error handling
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
2021-04-10 12:39:10 -07:00
..
bugpoint Avoid shuffle self-assignment in EXPENSIVE_CHECKS builds 2021-03-10 11:17:34 +00:00
bugpoint-passes
dsymutil [dsymutil] Don't emit .debug_pubnames and .debug_pubtypes 2021-04-06 19:01:45 -07:00
gold [gold] Match lld WPD behavior for shared library symbols and add test 2021-02-17 15:28:49 -08:00
llc [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
lli [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-ar [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-as llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-as-fuzzer
llvm-bcanalyzer llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-c-test LLVM-C: Allow LLVM{Get/Set}Alignment on an atomicrmw/cmpxchg instruction. 2021-02-12 18:31:18 -05:00
llvm-cat [tools] Use llvm::append_range (NFC) 2021-01-05 21:15:56 -08:00
llvm-cfi-verify [llvm-cfi-verify] Set UseSymbolTable to false 2021-02-10 09:44:13 -08:00
llvm-config [MinGW] Use lib prefix for libraries 2020-09-12 22:01:29 +03:00
llvm-cov [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-cvtres [llvm] Don't include StringSwitch.h where unnecessary (NFC) 2021-01-21 19:59:48 -08:00
llvm-cxxdump llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-cxxfilt
llvm-cxxmap [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-diff Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
llvm-dis [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-dwarfdump [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-dwp [llvm-dwp] Join dwo paths correctly when DWOPath is absolute 2021-02-16 13:38:35 -08:00
llvm-elfabi [llvm-elfabi] Add flag to preserve timestamp when output is the same 2020-12-29 20:27:06 -08:00
llvm-exegesis [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-extract llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-go
llvm-gsymutil [tools] Use llvm::append_range (NFC) 2021-01-05 21:15:56 -08:00
llvm-ifs [TextAPI] move source code files out of subdirectory, NFC 2021-04-05 10:24:42 -07:00
llvm-isel-fuzzer [AIX] Turn -fdata-sections on by default in Clang 2020-10-14 15:58:31 +00:00
llvm-itanium-demangle-fuzzer
llvm-jitlink [llvm-jitlink] Fix -Wunused-function on Windows 2021-03-31 09:26:09 -07:00
llvm-jitlistener [MCJIT] Profile the code generated by MCJIT engine using Intel VTune profiler 2020-11-16 19:28:14 +11:00
llvm-libtool-darwin [TextAPI] move source code files out of subdirectory, NFC 2021-04-05 10:24:42 -07:00
llvm-link [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-lipo [TextAPI] move source code files out of subdirectory, NFC 2021-04-05 10:24:42 -07:00
llvm-lto Recommit "[LTO] Use lto::backend for code generation." 2021-02-15 10:05:42 +00:00
llvm-lto2 Don't use $ as suffix for symbol names in ThinLTOBitcodeWriter and other places 2021-03-29 13:03:52 +02:00
llvm-mc [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-mc-assemble-fuzzer
llvm-mc-disassemble-fuzzer
llvm-mca [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-microsoft-demangle-fuzzer
llvm-ml [ms] [llvm-ml] Accept /WX to signal that warnings should be fatal. 2021-04-02 15:13:20 -04:00
llvm-modextract llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-mt llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-nm [llvm-symbolizer][llvm-nm] Fix AArch64 and ARM mapping symbols handling. 2021-03-23 14:17:12 +01:00
llvm-objcopy [llvm-objcopy][Support] move writeToOutput helper function to Support. 2021-03-22 15:41:10 +03:00
llvm-objdump [llvm-objdump] Implement --prefix-strip option 2021-03-24 13:22:35 +00:00
llvm-opt-fuzzer [FuzzMutate] Add mutator to modify instruction flags. 2021-01-23 19:05:20 +00:00
llvm-opt-report [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-pdbutil Removed redundant code. 2021-04-07 05:37:46 +04:00
llvm-profdata [CSSPGO] Fix dangling context strings and improve profile order consistency and error handling 2021-04-10 12:39:10 -07:00
llvm-profgen [CSSPGO] Fix dangling context strings and improve profile order consistency and error handling 2021-04-10 12:39:10 -07:00
llvm-rc [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-readobj [AIX][TLS] Add support for TLS variables to XCOFF object writer 2021-04-06 10:46:07 -05:00
llvm-reduce [llvm-reduce] Remove unwanted module inline asm 2021-04-06 09:35:37 -07:00
llvm-rtdyld [JITLink] Switch from StringRef to ArrayRef<char>, add some generic x86-64 utils 2021-03-30 21:07:24 -07:00
llvm-shlib Revert "llvm-shlib: Create object libraries for each component and link against them" 2021-04-05 10:46:19 -07:00
llvm-size [llvm-cov] Use is_contained (NFC) 2020-12-27 09:57:25 -08:00
llvm-special-case-list-fuzzer
llvm-split [LTO] Update splitCodeGen to take a reference to the module. (NFC) 2021-01-29 11:53:11 +00:00
llvm-stress Avoid shuffle self-assignment in EXPENSIVE_CHECKS builds 2021-03-10 11:17:34 +00:00
llvm-strings llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-symbolizer [llvm-symbolizer] Don't use the same 'OutputStyle' name for the enum type and instance. NFCI. 2021-04-06 15:21:48 +01:00
llvm-undname llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-xray [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
llvm-yaml-numeric-parser-fuzzer [llvm] NFC: Cleanup llvm-yaml-numeric-parser-fuzzer 2021-02-15 14:52:53 +01:00
llvm-yaml-parser-fuzzer [llvm] Use llvm::erase_value and llvm::erase_if (NFC) 2021-01-02 09:24:15 -08:00
lto [LTO][Legacy] Decouple option parsing from LTOCodeGenerator 2021-03-31 16:43:26 +00:00
msbuild
obj2yaml [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
opt [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
opt-viewer
remarks-shlib [tools][remarks-shlib] Don't build libRemarks.so without PIC 2020-09-20 12:40:21 +02:00
sancov [Support] Use InitLLVM in llvm-stress, sancov and TableGen 2020-07-28 07:50:45 -04:00
sanstats [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
split-file [split-file] Fix sys::fs::remove() on Solaris after D83834 2020-08-11 08:05:10 -07:00
verify-uselistorder [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
vfabi-demangle-fuzzer
xcode-toolchain
yaml2obj [llvm] Make obj2yaml and yaml2obj LLVM utilities instead of tools 2020-10-19 10:21:21 -07:00
CMakeLists.txt