1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test
Reid Kleckner f30ad55559 [PGO] Use linkonce_odr linkage for __profd_ variables in comdat groups
This fixes relocations against __profd_ symbols in discarded sections,
which is PR41380.

In general, instrumentation happens very early, and optimization and
inlining happens afterwards. The counters for a function are calculated
early, and after inlining, counters for an inlined function may be
widely referenced by other functions.

For C++ inline functions of all kinds (linkonce_odr &
available_externally mainly), instr profiling wants to deduplicate these
__profc_ and __profd_ globals. Otherwise the binary would be quite
large.

I made __profd_ and __profc_ comdat in r355044, but I chose to make
__profd_ internal. At the time, I was only dealing with coverage, and in
that case, none of the instrumentation needs to reference __profd_.
However, if you use PGO, then instrumentation passes add calls to
__llvm_profile_instrument_range which reference __profd_ globals. The
solution is to make these globals externally visible by using
linkonce_odr linkage for data as was done for counters.

This is safe because PGO adds a CFG hash to the names of the data and
counter globals, so if different TUs have different globals, they will
get different data and counter arrays.

Reviewers: xur, hans

Differential Revision: https://reviews.llvm.org/D67579

llvm-svn: 372020
2019-09-16 18:49:09 +00:00
..
Analysis [SCEV] Add smin support to getRangeRef 2019-09-12 21:32:27 +00:00
Assembler
Bindings
Bitcode
BugPoint
CodeGen [ARM][Codegen] Autogenerate arm-cgp-casts.ll test. 2019-09-16 18:28:22 +00:00
DebugInfo Revert "Fix test failures after r371640" 2019-09-13 08:26:59 +00:00
Demangle
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation [PGO] Use linkonce_odr linkage for __profd_ variables in comdat groups 2019-09-16 18:49:09 +00:00
Integer
JitListener
Linker
LTO [IRMover] Don't map globals if their types are the same 2019-09-11 18:35:49 +00:00
MachineVerifier
MC [WebAssembly] Narrowing and widening SIMD ops 2019-09-13 22:54:41 +00:00
Object [llvm-ar] Uncapitalize error messages and delete full stop 2019-09-14 01:18:47 +00:00
ObjectYAML [yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers. 2019-09-13 16:00:16 +00:00
Other
Reduce Fix llvm-reduce tests so that they don't assume the source code is 2019-09-12 21:03:49 +00:00
SafepointIRVerifier
Support
SymbolRewriter
TableGen [CodeEmitter] Improve testing for APInt encoding 2019-09-15 08:44:40 +00:00
ThinLTO/X86 Reland "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2019-09-11 16:19:50 +00:00
tools [llvm-objcopy] Ignore -B --binary-architecture= 2019-09-14 01:36:31 +00:00
Transforms [SimplifyCFG] FoldTwoEntryPHINode(): consider *total* speculation cost, not per-BB cost 2019-09-16 16:18:24 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py
lit.site.cfg.py.in
TestRunner.sh