1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/ThinLTO/X86
Teresa Johnson c649b1f9bb [ThinLTO] Fix handling of weak interposable symbols
Summary:
Keep aliasees alive if their alias is live, otherwise we end up with an
alias to a declaration, which is invalid. This can happen when the
aliasee is weak and non-prevailing.

This fix exposed the fact that we were then attempting to internalize
the weak symbol, which was not exported as it was not prevailing. We
should not internalize interposable symbols in general, unless this is
the prevailing copy, since it can lead to incorrect inlining and other
optimizations. Most of the changes in this patch are due to the
restructuring required to pass down the prevailing callback.

Finally, while implementing the test cases, I found that in the case of
a weak aliasee that is still marked not live because its alias isn't
live, after dropping the definition we incorrectly marked the
declaration with weak linkage when resolving prevailing symbols in the
module. This was due to some special case handling for symbols marked
WeakLinkage in the summary located before instead of after a subsequent
check for the symbol being a declaration. It turns out that we don't
actually need this special case handling any more (looking back at the
history, when that was added the code was structured quite differently)
- we will correctly mark with weak linkage further below when the
definition hasn't been dropped.

Fixes PR42542.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, dang, llvm-commits

Tags: #llvm

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

llvm-svn: 369766
2019-08-23 15:18:58 +00:00
..
Inputs [ThinLTO] Fix handling of weak interposable symbols 2019-08-23 15:18:58 +00:00
alias_import.ll [ThinLTO] Use original alias visibility when importing 2019-05-29 16:50:46 +00:00
alias_internal.ll
alias_resolution.ll
autoupgrade.ll
builtin-nostrip.ll
cache-config.ll
cache-icall.ll
cache-import-lists.ll
cache-typeid-resolutions.ll
cache.ll
callees-metadata.ll
cfi-devirt.ll [CodeGen] Make branch funnels pass the machine verifier 2019-07-03 17:16:45 +00:00
cfi-distributed.ll
cfi-icall-only-defuse.ll [ThinLTO] only emit used or referenced CFI records to index 2019-07-09 18:50:55 +00:00
cfi-icall.ll
cfi.ll
crash_debuginfo.ll
deadstrip.ll Fix 2-field llvm.global_ctors REQUIRES: asserts tests after rL360742 2019-05-15 03:08:21 +00:00
debuginfo-compositetype-import.ll
debuginfo-cu-import.ll
devirt2.ll Use llvm-nm instead of nm in new test to unbreak Windows bot 2019-08-02 15:49:39 +00:00
devirt-after-icp.ll [CodeGen] Make branch funnels pass the machine verifier 2019-07-03 17:16:45 +00:00
devirt.ll [ThinLTO] Implement index-based WPD 2019-08-02 13:10:52 +00:00
diagnostic-handler-remarks-with-hotness.ll
diagnostic-handler-remarks.ll [Remarks] Extend -fsave-optimization-record to specify the format 2019-06-17 16:06:00 +00:00
dicompositetype-unique2.ll
dicompositetype-unique-alias.ll
dicompositetype-unique.ll
distributed_import.ll
distributed_indexes.ll
dot-dumper2.ll [ThinLTO] Attempt to recommit r365188 after alignment fix 2019-07-05 15:25:05 +00:00
dot-dumper-full-lto.ll
dot-dumper.ll
drop-debug-info.ll
dsolocal_dllimport.ll
emit_imports.ll
empty_module_with_cache.ll
empty-module.ll
export.ll
funcimport2.ll
funcimport-debug.ll
funcimport-tbaa.ll
funcimport.ll
function_entry_count.ll
globals-import-blockaddr.ll
globals-import-const-fold.ll
globals-import.ll
import_opaque_type.ll
index-const-prop2.ll [ThinLTO] Attempt to recommit r365188 after alignment fix 2019-07-05 15:25:05 +00:00
index-const-prop-alias.ll
index-const-prop-cache.ll
index-const-prop-comdat.ll
index-const-prop-dead.ll
index-const-prop-full-lto.ll
index-const-prop-gvref.ll
index-const-prop-ldst.ll
index-const-prop-linkage.ll
index-const-prop-O0.ll
index-const-prop.ll
internalize.ll [ThinLTO] Fix handling of weak interposable symbols 2019-08-23 15:18:58 +00:00
lazyload_metadata.ll [BPF] add new intrinsics preserve_{array,union,struct}_access_index 2019-07-09 01:51:36 +00:00
linkonce_aliasee_ref_import.ll
linkonce_odr_unnamed_addr.ll [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
linkonce_resolution_comdat.ll IR: print value numbers for unnamed function arguments 2019-08-03 14:28:34 +00:00
lit.local.cfg [lit] Delete empty lines at the end of lit.local.cfg NFC 2019-06-17 09:51:07 +00:00
llvm.used.ll
load-store-caching.ll [ThinLTO] Attempt to recommit r365188 after alignment fix 2019-07-05 15:25:05 +00:00
local_name_conflict_var.ll
local_name_conflict.ll
merge-triple.ll
module_asm2.ll
module_asm_glob.ll
module_summary_graph_traits.ll
newpm-basic.ll
nodevirt-nonpromoted-typeid.ll [ThinLTO] Implement index-based WPD 2019-08-02 13:10:52 +00:00
noinline.ll
personality-local.ll [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
personality.ll [llvm-readobj] Change -t to --symbols in tests. NFC 2019-05-01 09:28:24 +00:00
pr35472.ll
prefix_replace.ll
printer.ll [NewPM][PassInstrumentation] Fix test added in r369024. 2019-08-15 23:24:14 +00:00
reference_non_importable.ll
referenced_by_constant.ll
save_objects.ll [ThinLTO] Adding architecture name into saved object filename 2019-04-29 21:39:54 +00:00
section.ll
strong_non_prevailing.ll [llvm-nm] Fix handling of symbol types 't' 'd' 'r' 2019-05-09 12:43:37 +00:00
thinlto-internalize-used.ll
tli-nobuiltin.ll
weak_externals.ll [ThinLTO] Don't internalize weak writeable variables 2019-05-13 11:53:05 +00:00
weak_resolution_single.ll
weak_resolution.ll
writeonly2.ll [ThinLTO] Attempt to recommit r365188 after alignment fix 2019-07-05 15:25:05 +00:00
writeonly.ll [ThinLTO] Attempt to recommit r365188 after alignment fix 2019-07-05 15:25:05 +00:00