1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/tools
Alexander Yermolovich d12ae1eaf8 [LLD][LLVM] CG Graph profile using relocations
Currently when .llvm.call-graph-profile is created by llvm it explicitly encodes the symbol indices. This section is basically a black box for post processing tools. For example, if we run strip -s on the object files the symbol table changes, but indices in that section do not. In non-visible behavior indices point to wrong symbols. The visible behavior indices point outside of Symbol table: "invalid symbol index".

This patch changes the format by using R_*_NONE relocations to indicate the from/to symbols. The Frequency (Weight) will still be in the .llvm.call-graph-profile, but symbol information will be in relocation section. In LLD information from both sections is used to reconstruct call graph profile. Relocations themselves will never be applied.

With this approach post processing tools that handle relocations correctly work for this section also. Tools can add/remove symbols and as long as they handle relocation sections with this approach information stays correct.

Doing a quick experiment with clang-13.
The size went up from 107KB to 322KB, aggregate of all the input sections. Size of clang-13 binary is ~118MB. For users of -fprofile-use/-fprofile-sample-use the size of object files will go up slightly, it will not impact final binary size.

Reviewed By: jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D104080
2021-06-24 09:09:33 -07:00
..
bugpoint Avoid shuffle self-assignment in EXPENSIVE_CHECKS builds 2021-03-10 11:17:34 +00:00
bugpoint-passes
dsymutil [dsymutil] Emit an error when the Mach-O exceeds the 4GB limit. 2021-05-24 16:29:06 -07:00
gold [gold] Match lld WPD behavior for shared library symbols and add test 2021-02-17 15:28:49 -08:00
llc Recommit "[VP,Integer,#2] ExpandVectorPredication pass" 2021-05-04 11:47:52 +02:00
lli [lli] Honor the --entry-function flag in orc and orc-lazy modes. 2021-04-13 11:33:24 -07: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 [ADT] Move DenseMapInfo for ArrayRef/StringRef into respective headers (NFC) 2021-06-03 18:34:36 +02:00
llvm-cat [tools] Use llvm::append_range (NFC) 2021-01-05 21:15:56 -08:00
llvm-cfi-verify [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -07:00
llvm-config [MinGW] Use lib prefix for libraries 2020-09-12 22:01:29 +03:00
llvm-cov [Coverage] Support overriding compilation directory 2021-05-11 15:26:45 -07:00
llvm-cvtres [llvm-cvtres] Reduce the set of dependencies of llvm-cvtres. NFC. 2021-04-21 11:50:10 +03:00
llvm-cxxdump llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-cxxfilt [demangler] Initial support for the new Rust mangling scheme 2021-05-03 16:44:30 -07:00
llvm-cxxmap [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
llvm-diff [llvm-diff] Explicitly check ConstantStructs for differences 2021-06-23 16:26:34 -07:00
llvm-dis Allow llvm-dis to disassemble multiple files 2021-05-06 11:08:55 -07:00
llvm-dwarfdump clang-format llvm-dwarfdump.cpp 2021-06-23 10:44:13 -07:00
llvm-dwp [llvm-dwp] Add support for rnglists and loclists 2021-06-02 12:31:35 -07: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 [llvm-exegesis] Fix X86LbrCounter destructor to correctly unmap memory and not double-close fd (PR50620) 2021-06-15 14:24:35 +01:00
llvm-extract llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-go
llvm-gsymutil Add --quiet option to llvm-gsymutil to suppress output of warnings. 2021-05-27 12:36:34 +00:00
llvm-ifs [SystemZ][z/OS] Add IsText Argument to GetFile and GetFileOrSTDIN 2021-04-16 10:08:36 -04: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 [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -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 [Support] Don't include VirtualFileSystem.h in CommandLine.h 2021-04-21 10:19:01 -04:00
llvm-link NFC: Run clang-format over llvm-link. 2021-04-28 14:33:00 -07:00
llvm-lipo [TextAPI] move source code files out of subdirectory, NFC 2021-04-05 10:24:42 -07:00
llvm-lto [LTO] Support new PM in ThinLTOCodeGenerator. 2021-06-09 10:05:14 +01: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-mc] Add -M to replace -riscv-no-aliases and -riscv-arch-reg-names 2021-05-26 10:43:32 -07:00
llvm-mc-assemble-fuzzer [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -07:00
llvm-mc-disassemble-fuzzer
llvm-mca [MCA] Allow unlimited cycles in the timeline view 2021-06-24 12:54:57 +01:00
llvm-microsoft-demangle-fuzzer
llvm-ml [ms] [llvm-ml] Add support for INCLUDE environment variable 2021-06-09 17:54:40 -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-nm] Support the -V option, print that the tool is compatible with GNU nm 2021-05-13 22:36:25 +03:00
llvm-objcopy [llvm-objcopy][MachO] Fix namespace style issues 2021-06-23 00:31:52 -07:00
llvm-objdump [XCOFF][AIX] Enable tooling support for 64 bit symbol table parsing 2021-06-07 17:24:13 +00:00
llvm-opt-fuzzer [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07: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 [ADT] Remove APInt/APSInt toString() std::string variants 2021-06-11 13:19:15 +01:00
llvm-profdata [llvm-profdata] Allow omission of -o for --text output 2021-06-21 12:01:57 -07:00
llvm-profgen [CSSPGO][llvm-profgen] Handle return to external transition. 2021-06-22 16:24:59 -07:00
llvm-rc [ADT] Add StringRef consume_front_lower and consume_back_lower 2021-06-22 12:38:08 +03:00
llvm-readobj [LLD][LLVM] CG Graph profile using relocations 2021-06-24 09:09:33 -07:00
llvm-reduce [llvm-reduce] Don't delete arguments of intrinsics 2021-06-21 12:43:58 -07:00
llvm-rtdyld [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -07:00
llvm-rust-demangle-fuzzer Fix implicit dependency on <string> header. NFCI. 2021-06-11 10:24:14 +01:00
llvm-shlib [CMake][ELF] Link libLLVM.so and libclang-cpp.so with -Bsymbolic-functions 2021-05-13 13:44:57 -07:00
llvm-sim [IRSim] Adding basic implementation of llvm-sim. 2021-06-23 14:38:58 -05: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 [llvm-stress] Fix dead code preventing us generating per-element vector selects 2021-06-11 10:56:19 +01:00
llvm-strings llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-symbolizer [llvm-symbolizer] Place Mach-O options into the Mach-O option group. 2021-05-12 12:04:54 +01:00
llvm-tapi-diff [llvm-tapi-diff] Wrap empty string around StringLiteral NFC 2021-06-23 11:41:03 -07:00
llvm-undname llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
llvm-xray xray-color-helper.cpp - add missing implicit cmath header dependency. NFCI. 2021-06-05 21:33:24 +01: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 [AIX] Build libLTO as MODULE rather than SHARED 2021-06-10 12:08:59 -04:00
msbuild
obj2yaml [LLD][LLVM] CG Graph profile using relocations 2021-06-24 09:09:33 -07:00
opt [NewPM] Add options to PrintPassInstrumentation 2021-05-18 20:59:35 -07:00
opt-viewer
remarks-shlib [tools][remarks-shlib] Don't build libRemarks.so without PIC 2020-09-20 12:40:21 +02:00
sancov [MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo 2021-05-23 14:15:23 -07:00
sanstats [NFC] Reordering parameters in getFile and getFileOrSTDIN 2021-03-25 09:47:49 -04:00
split-file NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -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