[PATCH] D83812: [clang][RelativeVTablesABI] Do not emit stubs for architectures that support a PLT relocation
Leonard Chan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 14 13:17:08 PDT 2020
leonardchan created this revision.
leonardchan added reviewers: rjmccall, pcc, phosek, mcgrathr, rsmith.
leonardchan added a project: clang.
Herald added subscribers: s.egerton, simoncook, kristof.beyls.
Herald added a reviewer: jdoerfert.
Now that LLVM and LLD support the `R_AARCH64_PLT32` relocation, the relative vtables ABI does not require emitting dso_local stubs for AArch64. The stubs were needed initially because we couldn't guarantee a static relocation for a function slot in the vtable if the function was not guaranteed to be dso_local. Not emitting these stubs saves a lot of extra binary size.
This patch adds a helper function which checks if stubs should be added and updates various tests that initially used stubs when targeting AArch64. Most of these tests should not be checking for stubs anymore.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83812
Files:
clang/lib/CodeGen/CGVTables.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/child-vtable-in-comdat.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/diamond-inheritance.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/diamond-virtual-inheritance.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/inline-virtual-function.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/inlined-key-function.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/multiple-inheritance.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/no-stub-when-dso-local.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/parent-and-child-in-comdats.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/parent-vtable-in-comdat.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/pass-byval-attributes.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/stub-linkages.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/stub-usage.cpp
clang/test/CodeGenCXX/RelativeVTablesABI/type-info.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83812.277947.patch
Type: text/x-patch
Size: 81102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200714/141da9dd/attachment-0001.bin>
More information about the cfe-commits
mailing list