diff options
author | Mingming Liu <mingmingl@google.com> | 2024-11-20 23:44:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 23:44:18 -0800 |
commit | 97b2903455fbe2de0c88cf07b92a09dc8cb7e699 (patch) | |
tree | 78d133756a659cd52415862ca76b119b80140cf0 /clang/unittests/Serialization/InMemoryModuleCacheTest.cpp | |
parent | a6fefc82450e054336a52a5d2d915b780b8c3ef7 (diff) | |
download | llvm-97b2903455fbe2de0c88cf07b92a09dc8cb7e699.zip llvm-97b2903455fbe2de0c88cf07b92a09dc8cb7e699.tar.gz llvm-97b2903455fbe2de0c88cf07b92a09dc8cb7e699.tar.bz2 |
[NFCI][WPD]Use unique string saver to store type id (#106932)
Currently, both
[TypeIdMap](https://github.com/llvm/llvm-project/blob/67a1fdb014790a38a205d28e1748634de34471dd/llvm/include/llvm/IR/ModuleSummaryIndex.h#L1356)
and
[TypeIdCompatibleVtableMap](https://github.com/llvm/llvm-project/blob/67a1fdb014790a38a205d28e1748634de34471dd/llvm/include/llvm/IR/ModuleSummaryIndex.h#L1363)
keep type-id as `std::string` in the combined index for LTO indexing
analysis.
With this change, index uses a unique-string-saver to own the string
copies and two maps above can use string references to save some memory.
This shows a 3% memory reduction (from 8.2GiB to 7.9GiB) in an internal
binary with high indexing memory usage.
Diffstat (limited to 'clang/unittests/Serialization/InMemoryModuleCacheTest.cpp')
0 files changed, 0 insertions, 0 deletions