[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 08:42:18 PDT 2024


minglotus-6 wrote:

> FWIW, if I remember correctly from trying some versions of this, I think DenseMap for `FunctionsToImportTy` might have used much more memory than unordered_map (and the original unordered_set).

Thanks for this info! To optimize the memory usage of this patch, I'm thinking about to storing per-module imported declaration set as another `DenseMap<StringRef, unordered_set<uint64_t>>`. With selective declaration import, this map should be small.

Note this will duplicate module paths (`StringRef` as key) in the map. It might be possible to have a separate map (`DenseMap<StringRef, int>`) to map module path into integers for `ImportLists` and `ExportLists`, and store integers in other map keys. 

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


More information about the llvm-commits mailing list