[llvm] [TableGen] Rework `EmitIntrinsicToBuiltinMap` (PR #104681)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 10:58:40 PDT 2024
jurahul wrote:
> Thanks @arsenm. I realized though that change in the `BuiltinEntry` struct is actually a space regression. We have one `BuiltinEntry` for each builtin, so the number of builtin entries allocated statically is the same in both cases. But the size of each entry is 64-bits/8 bytes in the old case (ID, offset) but is now its 24 bytes (4-byte id, 4-byte pad, 8-byte data, 8-byte size for StringRef) so this will negate any benefit of reducing the size of the builtin names table by stripping out common prefix.
>
> So I will go back to the old scheme of just having offsets. I was thinking of optimizing the string table further by eliminating the null terminators since we had StringRef in the table entry, so we could initialize the size in each entry instead of relying on a null terminator, but that won't be possible if we go back to using offset/id. However space wise it should be a net win (1 byte less per builtin vs 16 bytes less from going back to old scheme).
@Artem-B ^^
https://github.com/llvm/llvm-project/pull/104681
More information about the llvm-commits
mailing list