llvm-mirror/test
Teresa Johnson 69b4df22e0 [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible
Summary:
We hit undefined references building with ThinLTO when one source file
contained explicit instantiations of a template method (weak_odr) but
there were also implicit instantiations in another file (linkonce_odr),
and the latter was the prevailing copy. In this case the symbol was
marked hidden when the prevailing linkonce_odr copy was promoted to
weak_odr. It led to unsats when the resulting shared library was linked
with other code that contained a reference (expecting to be resolved due
to the explicit instantiation).

Add a CanAutoHide flag to the GV summary to allow the thin link to
identify when all copies are eligible for auto-hiding (because they were
all originally linkonce_odr global unnamed addr), and only do the
auto-hide in that case.

Most of the changes here are due to plumbing the new flag through the
bitcode and llvm assembly, and resulting test changes. I augmented the
existing auto-hide test to check for this situation.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, eraman, dexonsmith, arphaman, dang, llvm-commits, steven_wu, wmi

Tags: #llvm

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

llvm-svn: 360466
2019-05-10 20:08:24 +00:00
..
Analysis [MemorySSA] Fix CHECKs in test. [NFC] 2019-05-07 22:26:52 +00:00
Assembler [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
Bindings Replace 'REQUIRES: not_?san' with 'UNSUPPORTED: ?san' as that better 2019-05-10 18:08:02 +00:00
Bitcode [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
BugPoint
CodeGen Adjust MachineScheduler to use ProcResource counts 2019-05-10 16:54:32 +00:00
DebugInfo DebugInfo: Only move types out of type units if they're named or type united 2019-05-10 19:15:29 +00:00
Demangle
Examples
ExecutionEngine [JITLink] Fixed a signedness bug when processing X86_64_RELOC_SUBTRACTOR. 2019-05-09 23:17:41 +00:00
Feature
FileCheck [FileCheck, NFC] Split defines.txt in two 2019-05-08 21:47:36 +00:00
Instrumentation [SanitizerCoverage] Use different module ctor names for trace-pc-guard and inline-8bit-counters 2019-05-07 01:39:37 +00:00
Integer
JitListener
Linker
LTO
MachineVerifier
MC Replace 'REQUIRES: nozlib' with '!zlib' because we don't need two ways 2019-05-10 18:47:39 +00:00
Object [Object] Fix macho-invalid.test 2019-05-10 10:47:30 +00:00
ObjectYAML
Other
SafepointIRVerifier
Support [CommandLine] Change help output to prefix long options with -- instead of -. NFC . Part 3 of 5 2019-05-03 17:47:29 +00:00
SymbolRewriter
TableGen
ThinLTO/X86 [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
tools [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
Transforms [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
Unit
Verifier Debug Info: Support address space attributes on rvalue references. 2019-05-07 17:42:38 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py
lit.site.cfg.py.in
TestRunner.sh