From bf4fa3036aec8a6b41431d1e4e4fd3e7e52c4482 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 16 Dec 2021 21:07:39 -0800 Subject: [PATCH] [ELF] Use SmallVector for MergeInputSection::pieces. NFC sizeof(pieces) decreases from 24 to 16 on ELF64. One BumpPtrAllocator can store more MergeInputSections. The lld executable becomes smaller. --- lld/ELF/InputSection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index 7ddc43916a0f..70bbe4975a38 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -278,7 +278,7 @@ public: // Splittable sections are handled as a sequence of data // rather than a single large blob of data. - std::vector pieces; + SmallVector pieces; // Returns I'th piece's data. This function is very hot when // string merging is enabled, so we want to inline.