llvm-project/llvm/test/ThinLTO/X86
Teresa Johnson fee0bde4c6 [WPD] Extend checking mode to support fallback to indirect call
Extend -wholeprogramdevirt-check to support both the existing
trapping mode on an incorrect devirtualization, as well as a new
mode to fallback to an indirect call on a mismatch. The new mode is

The new mode is useful in cases where we want to enable
devirtualization but cannot fully guarantee whole program visibility
(e.g in the case where LTO has been disabled for a small set of objects
that could potentially override virtual methods without having a symbol
reference to anything in the base class including the vtable).

Remove !prof and !callees metadata (which are used by indirect call
promotion) from both the new direct call and the fallback indirect call
(so that we don't perform another round of promotion on the latter).
Also remove it from the direct call in the non-fallback cases, which
was an oversight, although it didn't seem to cause any issues. Add tests
for the metadata removal covering the various cases.

Differential Revision: https://reviews.llvm.org/D121419
2022-03-14 10:16:28 -07:00
..
Inputs [LTO] Initialize canAutoHide() using canBeOmittedFromSymbolTable() 2022-03-03 19:04:11 -05:00
DSOLocalEquivalent.ll [llvm] Change DSOLocalEquivalent type if the underlying global value type changes 2021-03-09 15:09:48 -08:00
alias_import.ll
alias_internal.ll
alias_resolution.ll
asm.ll [IRSymTab] Set FB_used on llvm.compiler.used symbols 2021-03-03 16:22:30 -08:00
autoupgrade.ll
builtin-nostrip-aix.ll [IRSymTab] Mark __stack_chk_guard used 2021-10-28 11:22:26 -07:00
builtin-nostrip.ll [IRSymTab] Mark __stack_chk_guard used 2021-10-28 11:22:26 -07:00
cache-config.ll
cache-icall.ll
cache-import-lists.ll
cache-typeid-resolutions.ll
cache.ll [Support] [DebugInfo] Lazily create cache dir. 2022-01-20 19:27:15 +00:00
callees-metadata.ll
cfi-devirt.ll [InstCombine] Always try to invert non-canonical predicate of an icmp 2020-07-04 18:12:04 +03:00
cfi-distributed.ll
cfi-icall-only-defuse.ll
cfi-icall.ll
cfi-unsat.ll Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-07-14 12:16:57 -07:00
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 [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation 2021-09-27 12:28:07 -07:00
debuginfo-compositetype-import.ll
debuginfo-cu-import.ll
devirt-after-icp.ll
devirt.ll [WPD] Extend checking mode to support fallback to indirect call 2022-03-14 10:16:28 -07:00
devirt2.ll [ThinLTO][MC] Use conditional assignments for promotion aliases 2021-12-10 12:21:37 -08:00
devirt_after_filtering_unreachable.ll Simplify WPD test case for hybrid LTO and thinTLO. 2021-12-21 17:23:42 +00:00
devirt_alias.ll
devirt_available_externally.ll
devirt_check.ll [WPD] Extend checking mode to support fallback to indirect call 2022-03-14 10:16:28 -07:00
devirt_external_comdat_same_guid.ll
devirt_local_same_guid.ll
devirt_multiple_type_test.ll [WPD] Allow virtual calls to be analyzed with multiple type tests 2020-06-24 10:51:24 -07:00
devirt_promote.ll [test] Fix unused FileCheck prefix in ThinLTO test 2020-11-02 09:06:36 -08:00
devirt_promote_legacy.ll
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
diagnostic-handler-remarks-with-hotness.ll [InlineAdvisor] Add single quotes around caller/callee names 2021-08-10 11:51:31 -07:00
diagnostic-handler-remarks.ll [InlineAdvisor] Add single quotes around caller/callee names 2021-08-10 11:51:31 -07:00
dicompositetype-unique-alias.ll
dicompositetype-unique.ll
dicompositetype-unique2.ll
distributed_import.ll
distributed_indexes.ll [ThinLTO] Fix bot failures 2021-09-23 18:00:48 -07:00
dontcall.ll Reland [clang] Rework dontcall attributes 2021-09-28 15:31:30 -07:00
dot-dumper-full-lto.ll
dot-dumper.ll [LTO] Ignore unreachable virtual functions in WPD in hybrid LTO. 2021-12-14 20:18:04 +00:00
dot-dumper2.ll [LTO] Ignore unreachable virtual functions in WPD in hybrid LTO. 2021-12-14 20:18:04 +00:00
drop-debug-info.ll
dsolocal_dllimport.ll
emit_imports.ll
empty-module.ll [Verifier] Add verification logic for GlobalIFuncs 2021-10-31 20:00:57 -07:00
empty_module_with_cache.ll [Support] [DebugInfo] Lazily create cache dir. 2022-01-20 19:27:15 +00:00
export.ll
funcattrs-prop-exported-internal.ll [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation 2021-09-27 12:28:07 -07:00
funcattrs-prop-maythrow.ll [LTO] Ignore unreachable virtual functions in WPD in hybrid LTO. 2021-12-14 20:18:04 +00:00
funcattrs-prop-undefined.ll [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation 2021-09-27 12:28:07 -07:00
funcattrs-prop-unknown.ll [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation 2021-09-27 12:28:07 -07:00
funcattrs-prop-weak.ll [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation 2021-09-27 12:28:07 -07:00
funcattrs-prop.ll [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation 2021-09-27 12:28:07 -07:00
funcimport-debug.ll
funcimport-stats.ll
funcimport-tbaa.ll
funcimport.ll
funcimport2.ll
funcimport_alwaysinline.ll [LTO] Ignore unreachable virtual functions in WPD in hybrid LTO. 2021-12-14 20:18:04 +00:00
function_entry_count.ll [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation 2021-09-27 12:28:07 -07:00
globals-import-blockaddr.ll [ThinLTO] Disallow importing for functions with indir branch to block address 2021-07-28 18:02:48 -07:00
globals-import-const-fold.ll
globals-import.ll
guid_collision.ll [NFC][llvm] Inclusive language: reword uses of sanity test and check 2021-11-25 07:21:42 -05:00
import-constant.ll Preserve the lexical order for global variables during llvm-link merge 2021-04-26 10:11:34 -07:00
import-dsolocal.ll [ThinLTO] Respect ClearDSOLocalOnDeclarations for unimported functions 2021-07-02 17:08:25 -07:00
import-metadata.ll [ThinLTO] Fix a metadata lost issue with DICompileUnit import. 2020-09-02 14:40:41 -07:00
import-ro-constant.ll
import-symver.ll [ThinLTO] Import symver directives for imported symbols (PR48214) 2020-12-02 14:56:43 +01:00
import_opaque_type.ll
index-const-prop-O0.ll
index-const-prop-alias.ll [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() 2020-04-07 15:46:01 -07:00
index-const-prop-cache.ll
index-const-prop-comdat.ll [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() 2020-04-07 15:46:01 -07:00
index-const-prop-dead.ll [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() 2020-04-07 15:46:01 -07:00
index-const-prop-full-lto.ll [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() 2020-04-07 15:46:01 -07:00
index-const-prop-gvref-pie.ll [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() 2020-04-07 15:46:01 -07:00
index-const-prop-gvref.ll [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() 2020-04-07 15:46:01 -07:00
index-const-prop-ldst.ll [ThinLTO] Drop dso_local if a GlobalVariable satisfies isDeclarationForLinker() 2020-04-07 15:46:01 -07:00
index-const-prop-linkage.ll [ThinLTO] Respect ClearDSOLocalOnDeclarations for unimported functions 2021-07-02 17:08:25 -07:00
index-const-prop.ll Preserve the lexical order for global variables during llvm-link merge 2021-04-26 10:11:34 -07:00
index-const-prop2.ll Preserve the lexical order for global variables during llvm-link merge 2021-04-26 10:11:34 -07:00
internalize.ll [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab 2020-08-26 10:15:00 -07:00
lazyload_metadata.ll
linkonce_aliasee_ref_import.ll
linkonce_odr_unnamed_addr.ll [LTO] Initialize canAutoHide() using canBeOmittedFromSymbolTable() 2022-03-03 19:04:11 -05:00
linkonce_resolution_comdat.ll [ThinLTO] Add noRecurse and noUnwind thinlink function attribute propagation 2021-09-27 12:28:07 -07:00
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.ll
local_name_conflict_var.ll
mangled_symbol.ll [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab 2020-08-26 10:15:00 -07:00
merge-triple.ll
module_asm2.ll
module_asm_glob.ll
module_summary_graph_traits.ll
newpm-basic.ll [LTO] Support new PM in ThinLTOCodeGenerator. 2021-06-09 10:05:14 +01:00
nodevirt-nonpromoted-typeid.ll Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-07-14 12:16:57 -07:00
noinline.ll
nossp.ll Don't override __attribute__((no_stack_protector)) by inlining (PR52886) 2022-01-13 12:04:49 +01:00
not-internalized.ll
personality-local.ll
personality.ll
pr35472.ll
prefix_replace.ll
printer.ll [NewPM] Cleanup IR printing instrumentation 2021-04-15 09:50:55 -07:00
pseudo-probe-desc-import.ll [CSSPGO] Do not import pseudo probe desc in thinLTO 2021-07-13 18:26:36 -07:00
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 Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-07-14 12:16:57 -07:00
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.ll [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab 2020-08-26 10:15:00 -07:00
weak_resolution_single.ll [ThinLTO][Legacy] Compute PreservedGUID based on IRName in Symtab 2020-08-26 10:15:00 -07:00
writeonly-with-refs.ll
writeonly.ll Preserve the lexical order for global variables during llvm-link merge 2021-04-26 10:11:34 -07:00
writeonly2.ll Preserve the lexical order for global variables during llvm-link merge 2021-04-26 10:11:34 -07:00