1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/tools
Wenlei He 1b193b8bb3 [CSSPGO][llvm-profgen] Context-sensitive global pre-inliner
This change sets up a framework in llvm-profgen to estimate inline decision and adjust context-sensitive profile based on that. We call it a global pre-inliner in llvm-profgen.

It will serve two purposes:
  1) Since context profile for not inlined context will be merged into base profile, if we estimate a context will not be inlined, we can merge the context profile in the output to save profile size.
  2) For thinLTO, when a context involving functions from different modules is not inined, we can't merge functions profiles across modules, leading to suboptimal post-inline count quality. By estimating some inline decisions, we would be able to adjust/merge context profiles beforehand as a mitigation.

Compiler inline heuristic uses inline cost which is not available in llvm-profgen. But since inline cost is closely related to size, we could get an estimate through function size from debug info. Because the size we have in llvm-profgen is the final size, it could also be more accurate than the inline cost estimation in the compiler.

This change only has the framework, with a few TODOs left for follow up patches for a complete implementation:
  1) We need to retrieve size for funciton//inlinee from debug info for inlining estimation. Currently we use number of samples in a profile as place holder for size estimation.
  2) Currently the thresholds are using the values used by sample loader inliner. But they need to be tuned since the size here is fully optimized machine code size, instead of inline cost based on not yet fully optimized IR.

Differential Revision: https://reviews.llvm.org/D99146
2021-03-29 09:46:14 -07:00
..
bugpoint Avoid shuffle self-assignment in EXPENSIVE_CHECKS builds 2021-03-10 11:17:34 +00:00
bugpoint-passes
dsymutil [dsymutil] Only look for ThinLTO suffixes if we failed to find symbol. 2021-03-23 10:55:48 -07:00
gold [gold] Match lld WPD behavior for shared library symbols and add test 2021-02-17 15:28:49 -08:00
llc [Diagnose] Unify MCContext and LLVMContext diagnosing 2021-03-01 15:58:37 -08:00
lli [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -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 Fix several places that were calling verifyFunction or verifyModule without checking the return value. 2020-05-18 13:28:46 -07:00
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 llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-diff Switch from llvm::is_trivially_copyable to std::is_trivially_copyable 2020-12-02 22:02:48 -08:00
llvm-dis llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-dwarfdump [llvm-dwarfdump] StringMap -> MapVector to make iteration order stable 2021-02-25 20:05:05 -08: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 Avoid shuffle self-assignment in EXPENSIVE_CHECKS builds 2021-03-10 11:17:34 +00: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 [llvm-ifs] Add option to use InterfaceStub library 2021-03-04 11:28:49 -08: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 [JITLink][ELF/x86-64] Add support for GOTOFF64 relocation. 2021-03-22 10:40:50 -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 [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-link [llvm] Add assertions for the smart pointers with the possibility to be null in ModuleLazyLoaderCache::operator() 2021-03-19 13:52:34 -07:00
llvm-lipo [Target] Use llvm::any_of (NFC) 2020-12-24 19:43:26 -08: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 [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref 2020-11-21 21:04:12 -08:00
llvm-mc-assemble-fuzzer Add missing include Host.h in llvm-mc-* fuzzers. NFC. 2020-05-18 02:21:22 +07:00
llvm-mc-disassemble-fuzzer Add missing include Host.h in llvm-mc-* fuzzers. NFC. 2020-05-18 02:21:22 +07:00
llvm-mca [MCA] Disable RCU for InOrderIssueStage 2021-03-24 13:54:04 +03:00
llvm-microsoft-demangle-fuzzer Give microsoftDemangle() an outparam for how many input bytes were consumed. 2020-05-20 16:17:31 -04:00
llvm-ml [ms] [llvm-ml] Allow the /Zs parameter as a synonym for -filetype=null 2021-03-17 12:18:43 -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
llvm-pdbutil [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-profdata [CSSPGO] llvm-profdata support for CS profile. 2021-03-08 09:04:40 -08:00
llvm-profgen [CSSPGO][llvm-profgen] Context-sensitive global pre-inliner 2021-03-29 09:46:14 -07:00
llvm-rc [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-readobj [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
llvm-reduce [llvm-reduce] ReduceGlobalVarInitializers delta pass: fix handling of globals w/ comdat/non-external linkage 2021-01-07 18:05:03 +03:00
llvm-rtdyld [llvm][clang][mlir] Add checks for the return values from Target::createXXX to prevent protential null deref 2020-11-21 21:04:12 -08:00
llvm-shlib [Support] On Windows, add optional support for {rpmalloc|snmalloc|mimalloc} 2020-08-27 11:09:46 -04: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] - Fix the crash in GNU output style with --no-inlines and missing input file. 2021-01-30 18:36:38 +03:00
llvm-undname llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-xray [llvm] Use llvm::is_contained (NFC) 2021-02-14 08:36:20 -08: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 [llvm] Use append_range (NFC) 2021-01-29 23:23:34 -08:00
msbuild
obj2yaml [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
opt [X86] Pass to transform amx intrinsics to scalar operation. 2021-03-16 10:40:22 +08: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 llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01: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 [Flang] add flang as a new subproject in cmake 2020-04-09 16:13:18 +01:00