[Support] Change MapVector's default template parameter to SmallVector<*, 0>
authorFangrui Song <i@maskray.me>
Tue, 25 Jul 2023 05:04:03 +0000 (22:04 -0700)
committerFangrui Song <i@maskray.me>
Tue, 25 Jul 2023 05:04:03 +0000 (22:04 -0700)
commitfb2a971c015fa991b47aa8d93bd97379c012cb68
tree37041f9336f4eebd1634bcc15672ab8036634aa9
parent480d7a3aff8db0b812bdd36e7be8d78a7a0fd430
[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
lld/MachO/UnwindInfoSection.cpp
llvm/include/llvm/ADT/MapVector.h
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
mlir/lib/IR/AsmPrinter.cpp