1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/ThinLTO/X86
Teresa Johnson 3133ac74f4 [WPD] Fix handling of pure virtual base class
The fix in 3c4c205060c9398da705eb71b63ddd8a04999de9 caused an assert in
the case of a pure virtual base class. In that case, the vTableFuncs
list on the summary will be empty, so we were hitting the new assert
that the linkage type was not available_externally.

In the case of pure virtual, we do not want to assert, and additionally
need to set VS so that we don't treat it conservatively and quit the
analysis of the type id early.

This exposed a pre-existing issue where we were not updating the vcall
visibility on pure virtual functions when whole program visibility was
specified. We were skipping updating the visibility on any global vars
that didn't have any vTableFuncs, which meant all pure virtual were not
updated, and the later analysis would block any devirtualization of
calls that had a type id used on those pure virtual vtables (see the
handling in the other code modified in this patch). Simply remove that
check. It will mean that we may update the vcall visibility on global
vars that aren't vtables, but that setting is ignored for any global
vars that didn't have type metadata anyway.

Added a new test case that asserted without removing the assert, and
that requires the other fixes in this patch (updateVCallVisibilityInIndex
and not skipping all vtables without virtual funcs) to get a successful
devirtualization with index-only WPD. I added cases to test hybrid and
regular LTO for completeness, although those already worked without the
fixes here.

With this final fix, a clang multistage bootstrap with WPD builds and
runs all tests successfully.

Differential Revision: https://reviews.llvm.org/D97126
2021-02-23 16:07:09 -08:00
..
Inputs [NFCI] Add missing triple to several LTO tests 2020-12-09 13:13:58 -08:00
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-unsat.ll
cfi.ll
crash_debuginfo.ll [test] Make ThinLTO/X86/crash_debuginfo.ll work with -enable-new-pm=1 2020-10-27 12:37:19 -07:00
deadstrip.ll
debuginfo-compositetype-import.ll
debuginfo-cu-import.ll
devirt2.ll
devirt_alias.ll
devirt_available_externally.ll
devirt_check.ll [WPD] Add an optional checking mode for debugging devirtualization 2021-02-17 16:46:15 -08:00
devirt_external_comdat_same_guid.ll
devirt_local_same_guid.ll
devirt_multiple_type_test.ll
devirt_promote_legacy.ll
devirt_promote.ll [test] Fix unused FileCheck prefix in ThinLTO test 2020-11-02 09:06:36 -08:00
devirt_pure_virtual_base.ll [WPD] Fix handling of pure virtual base class 2021-02-23 16:07:09 -08:00
devirt_single_hybrid.ll
devirt_vcall_vis_hidden.ll
devirt_vcall_vis_public.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_alwaysinline.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
funcimport-debug.ll
funcimport-stats.ll
funcimport-tbaa.ll
funcimport.ll
function_entry_count.ll
globals-import-blockaddr.ll
globals-import-const-fold.ll
globals-import.ll
guid_collision.ll
import_opaque_type.ll
import-constant.ll
import-metadata.ll
import-ro-constant.ll
import-symver.ll [ThinLTO] Import symver directives for imported symbols (PR48214) 2020-12-02 14:56:43 +01:00
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-pie.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 [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
local_name_conflict_var.ll
local_name_conflict.ll
mangled_symbol.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
nossp.ll [ThinLTO][test] Fix X86/nossp.ll after D91816 2020-12-02 13:13:58 -08:00
not-internalized.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-doublepromoted.ll
thinlto-internalize-used.ll
tli-nobuiltin.ll
type_test_noindircall.ll
visibility-elf.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
visibility-macho.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
weak_externals.ll
weak_globals_import.ll [ThinLTO] Fix import of multiply defined global variables 2021-02-21 18:34:12 +02:00
weak_resolution_single.ll
weak_resolution.ll
writeonly2.ll
writeonly-with-refs.ll
writeonly.ll