[llvm] [ThinLTO] Populate declaration import status except for distributed ThinLTO under a default-off new option (PR #88024)

Mingming Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 10:25:08 PDT 2024


minglotus-6 wrote:

> This would only duplicate the StringRef, not the whole string though I think? 

Yes. I understand that `StringRef` is not `std::string`.  [StringRef](https://github.com/llvm/llvm-project/blob/e8500a70540a04adfb8e102d3cfa6b9d95bc3ba6/llvm/include/llvm/ADT/StringRef.h#L59-L63) consists of a pointer and a `size_t`. If we could use `uint32_t` to represent module ID (and lazily create entries in `<ModulePath, ModuleID-as-uint32_t>` when `ImportLists` or `ExportLists` needs a module), it might give a moderate saving (say if a third map keyed by `StringRef` is added besides `ImportLists` or `ExportLists`)

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


More information about the llvm-commits mailing list