diff options
author | Fangrui Song <i@maskray.me> | 2023-07-24 22:04:03 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-07-24 22:04:03 -0700 |
commit | fb2a971c015fa991b47aa8d93bd97379c012cb68 (patch) | |
tree | 37041f9336f4eebd1634bcc15672ab8036634aa9 /lld | |
parent | 480d7a3aff8db0b812bdd36e7be8d78a7a0fd430 (diff) | |
download | llvm-fb2a971c015fa991b47aa8d93bd97379c012cb68.zip llvm-fb2a971c015fa991b47aa8d93bd97379c012cb68.tar.gz llvm-fb2a971c015fa991b47aa8d93bd97379c012cb68.tar.bz2 |
[Support] Change MapVector's default template parameter to SmallVector<*, 0>
SmallVector<*, 0> is often a better replacement for std::vector :
both the object size and the code size are smaller.
(SmallMapVector uses SmallVector as well, but it is not common.)
clang size decreases by 0.0226%.
instructions:u decreases 0.037% when compiling a sqlite3 amalgram.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D156016
Diffstat (limited to 'lld')
-rw-r--r-- | lld/MachO/UnwindInfoSection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/MachO/UnwindInfoSection.cpp b/lld/MachO/UnwindInfoSection.cpp index 0bffce0..1466e7b 100644 --- a/lld/MachO/UnwindInfoSection.cpp +++ b/lld/MachO/UnwindInfoSection.cpp @@ -146,7 +146,7 @@ private: Symbol *canonicalizePersonality(Symbol *); uint64_t unwindInfoSize = 0; - std::vector<decltype(symbols)::value_type> symbolsVec; + SmallVector<decltype(symbols)::value_type, 0> symbolsVec; CompactUnwindLayout cuLayout; std::vector<std::pair<compact_unwind_encoding_t, size_t>> commonEncodings; EncodingMap commonEncodingIndexes; |