llvm-mirror/test/Transforms/WholeProgramDevirt
Teresa Johnson 7a368427db [LTO/WPD] Enable aggressive WPD under LTO option
Summary:
Third part in series to support Safe Whole Program Devirtualization
Enablement, see RFC here:
http://lists.llvm.org/pipermail/llvm-dev/2019-December/137543.html

This patch adds type test metadata under -fwhole-program-vtables,
even for classes without hidden visibility. It then changes WPD to skip
devirtualization for a virtual function call when any of the compatible
vtables has public vcall visibility.

Additionally, internal LLVM options as well as lld and gold-plugin
options are added which enable upgrading all public vcall visibility
to linkage unit (hidden) visibility during LTO. This enables the more
aggressive WPD to kick in based on LTO time knowledge of the visibility
guarantees.

Support was added to all flavors of LTO WPD (regular, hybrid and
index-only), and to both the new and old LTO APIs.

Unfortunately it was not simple to split the first and second parts of
this part of the change (the unconditional emission of type tests and
the upgrading of the vcall visiblity) as I needed a way to upgrade the
public visibility on legacy WPD llvm assembly tests that don't include
linkage unit vcall visibility specifiers, to avoid a lot of test churn.

I also added a mechanism to LowerTypeTests that allows dropping type
test assume sequences we now aggressively insert when we invoke
distributed ThinLTO backends with null indexes, which is used in testing
mode, and which doesn't invoke the normal ThinLTO backend pipeline.

Depends on D71907 and D71911.

Reviewers: pcc, evgeny777, steven_wu, espindola

Subscribers: emaste, Prazek, inglorion, arichardson, hiraditya, MaskRay, dexonsmith, dang, davidxl, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D71913
2020-01-23 16:09:44 -08:00
..
Inputs Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
bad-read-from-vtable.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
branch-funnel-threshold.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
branch-funnel.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
constant-arg.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
devirt-single-impl-check.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
devirt-single-impl.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
expand-check.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
export-nothing.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
export-single-impl.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
export-uniform-ret-val.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
export-unique-ret-val.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
export-unsuccessful-checked.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
export-vcp.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
import-indir.ll [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible 2019-05-10 20:08:24 +00:00
import-no-dominating-assume.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
import.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
non-constant-vtable.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
pointer-vtable.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
soa-vtable.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
struct-vtable.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
uniform-retval-invoke.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
uniform-retval.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
unique-retval.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
vcp-accesses-memory.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
vcp-decl.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
vcp-no-this.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
vcp-non-constant-arg.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
vcp-too-wide-ints.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
vcp-type-mismatch.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
vcp-uses-this.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
virtual-const-prop-begin.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
virtual-const-prop-check.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
virtual-const-prop-end.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00
vtable-decl.ll [LTO/WPD] Enable aggressive WPD under LTO option 2020-01-23 16:09:44 -08:00