diff options
author | Kazu Hirata <kazu@google.com> | 2024-06-02 22:59:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-02 22:59:19 -0700 |
commit | f367eaa4647404414ab256d2ac3c4d4f6c6d1363 (patch) | |
tree | e7db3e35a84360dddea784945f55d7dc17b744e5 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 718331f55529469586c99a55e4b382a1c7485842 (diff) | |
download | llvm-f367eaa4647404414ab256d2ac3c4d4f6c6d1363.zip llvm-f367eaa4647404414ab256d2ac3c4d4f6c6d1363.tar.gz llvm-f367eaa4647404414ab256d2ac3c4d4f6c6d1363.tar.bz2 |
[memprof] Add accessors to Frame::SymbolName (#94085)
This patch adds accessors to Frame::SymbolName so that we can change
the underlying type of SymbolName without affecting downstream users
once they switch to the new accessors.
Note that SymbolName is only used for debugging. Changing the type of
SymbolName from std::optional<std::string> to
std::unique_ptr<std::string> cuts down sizeof(Frame) by half -- from
64 bytes to 32 bytes. (std::optional<T> sets aside the storage in
case T is instantiated.)
During deserialization, the memory usage is dominated by Frames.
Shrinking the type cuts down the memory usage and deserialization time
nearly by half.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
0 files changed, 0 insertions, 0 deletions