llvm-project
92f01b26 - [TableGen] Use StringTable for searchable tables (#206252)

Commit
1 day ago
[TableGen] Use StringTable for searchable tables (#206252) LLVM has some large searchable tables containing string pointers. This patch changes two things: - String references in searchable tables are now always StringTable offsets; and all code referencing these is updated accordingly. This often avoids relocations in the data structures, permitting their placement in .rodata instead of .data.rel.ro and avoids dynamic relocations. - The lookup indicies now reference the same string table instead of storing string pointers, permitting deduplication and also avoids dynamic relocations. In an all-target assert build, this changes section sizes as follows: - .data.rel.ro: -311920 - .rodata: +227712 - .rela.dyn: -308520 (-12855 entries) Note that due to 32-bit string offsets, most structures also got smaller. There is room for further size reductions by using 8/16 bit integers for string offsets where applicable and by permitting lower-case search indices when most entries are lower-case (avoids storing all strings twice) -- both can be done in later changes.
Author
Parents
Loading