[llvm] [MC][ELF] Eliminate some hash maps from ELFObjectWriter (PR #97421)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 13:26:53 PDT 2024


MaskRay wrote:

> Store signature group index in MCSymbolELF: This removes the need for a reverse lookup map.
>
> I'm unsure about the third part, it increases the size of MCSymbolELF and therefore max-rss. On the other hand, MCSymbol currently has 28 padding bits and an extra four padding bytes (if I counted correctly, the bit fields sum up to 36), but this seems unintended. @MaskRay what do you think? Use padding bytes in MCSymbol or drop the third commit and fix MCSymbol bit fields later?

Perhaps we should not make the MCSymbolELF change. Only a small portion of symbols are used as section group signatures. The `mutable` member is also a bit strange.

https://github.com/llvm/llvm-project/pull/97421


More information about the llvm-commits mailing list