[PATCH] D152405: [WIP][clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 17:15:29 PDT 2023


leonardchan added a comment.

In D152405#4404742 <https://reviews.llvm.org/D152405#4404742>, @mcgrathr wrote:

> In D152405#4404616 <https://reviews.llvm.org/D152405#4404616>, @leonardchan wrote:
>
>> Oh this is completely independent from relative vtables. I'll update the wording.
>
> Great. I'd like to see us try some experiments with enabling both together in places like the Fuchsia kernel where we get benefit from relative-vtables today but it's all a single fungible internal ABI domain and there's no problem having a one-off ABI. It's also interesting of course for true embedded contexts, but those tend to be ILP32 where relative-vtables isn't a size savings anyway. In the Fuchsia kernel we should get some size savings from this and it would be nice to see what that is (probably not all that big, but interesting).

In the kernel it saves us about 664 bytes with RV. For some embedded devices I measured, savings is on the order of 1-2kB. For chromium with RV, it would save about 77076 bytes from rodata, but standalone without RV, it's twice that so 154152 bytes saved from .data.rel.ro and this would scale based on the number of processes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152405/new/

https://reviews.llvm.org/D152405



More information about the cfe-commits mailing list