[all-commits] [llvm/llvm-project] 97b290: [NFCI][WPD]Use unique string saver to store type i...
Mingming Liu via All-commits
all-commits at lists.llvm.org
Wed Nov 20 23:44:40 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 97b2903455fbe2de0c88cf07b92a09dc8cb7e699
https://github.com/llvm/llvm-project/commit/97b2903455fbe2de0c88cf07b92a09dc8cb7e699
Author: Mingming Liu <mingmingl at google.com>
Date: 2024-11-20 (Wed, 20 Nov 2024)
Changed paths:
M llvm/include/llvm/IR/ModuleSummaryIndex.h
M llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list