[PATCH] D155659: [WPD][LLD] Add option to validate RTTI is enabled on all native types and prevent devirtualization on types with native RTTI
Di Mo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 13:38:13 PDT 2023
modimo added a comment.
Looking at https://github.com/llvm/llvm-project/blob/9b6b6bb/clang/lib/CodeGen/BackendUtil.cpp#L170-L173, RegularLTO will have a summary attached through Clang by default except for ld64 targets. The mixed case then reduces to RegularLTO+Summary and ThinLTO+Split since `EnableSplitLTOUnit` must be consistent so everything is done by `DevirtModule::run` and there's no mixture with `DevirtIndex::run`. The mechanism for `IsVisibleToRegularObj` for RegularLTO also ends up being identical to that of ThinLTO since all symbols will be present in the combined summary.
For ld64 targets there is a potential hole mixing RegularLTO+NoSummary with ThinLTO which would be caught with the current validation scheme. However, the validation functionality is only for the lld ELF target so the ld64 targets are unchanged.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155659/new/
https://reviews.llvm.org/D155659
More information about the llvm-commits
mailing list