mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
c649b1f9bb
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 |
||
---|---|---|
.. | ||
Inputs | ||
alias_import.ll | ||
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 | ||
cfi-distributed.ll | ||
cfi-icall-only-defuse.ll | ||
cfi-icall.ll | ||
cfi.ll | ||
crash_debuginfo.ll | ||
deadstrip.ll | ||
debuginfo-compositetype-import.ll | ||
debuginfo-cu-import.ll | ||
devirt2.ll | ||
devirt-after-icp.ll | ||
devirt.ll | ||
diagnostic-handler-remarks-with-hotness.ll | ||
diagnostic-handler-remarks.ll | ||
dicompositetype-unique2.ll | ||
dicompositetype-unique-alias.ll | ||
dicompositetype-unique.ll | ||
distributed_import.ll | ||
distributed_indexes.ll | ||
dot-dumper2.ll | ||
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 | ||
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 | ||
lazyload_metadata.ll | ||
linkonce_aliasee_ref_import.ll | ||
linkonce_odr_unnamed_addr.ll | ||
linkonce_resolution_comdat.ll | ||
lit.local.cfg | ||
llvm.used.ll | ||
load-store-caching.ll | ||
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 | ||
noinline.ll | ||
personality-local.ll | ||
personality.ll | ||
pr35472.ll | ||
prefix_replace.ll | ||
printer.ll | ||
reference_non_importable.ll | ||
referenced_by_constant.ll | ||
save_objects.ll | ||
section.ll | ||
strong_non_prevailing.ll | ||
thinlto-internalize-used.ll | ||
tli-nobuiltin.ll | ||
weak_externals.ll | ||
weak_resolution_single.ll | ||
weak_resolution.ll | ||
writeonly2.ll | ||
writeonly.ll |