From 3ce39390c1cd2c9529771574f38ea517f135fc07 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 2 Apr 2019 22:11:58 +0000 Subject: [PATCH] [COFF] Reduce the size of Chunk and SectionChunk, NFC Summary: Reorder the fields in both to use padding more efficiently, and add more comments on the purpose of the fields. Replace `std::vector AssociativeChildren` with a singly-linked list. This avoids the separate vector allocation to list associative children, and shrinks the 3 pointers used for the typically empty vector down to 1. In the end, this reduces the sum of heap allocations used to link browser_tests.exe with NO PDB by 13.10%, going from 2,248,728 KB to 1,954,071 KB of heap. These numbers exclude memory mapped files, which are of course a significant factor in LLD's memory usage. Reviewers: ruiu, mstorsjo, aganea Subscribers: jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59797 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357535 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/BinaryFormat/COFF.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/BinaryFormat/COFF.h b/include/llvm/BinaryFormat/COFF.h index e0543dea4c2..0fe38a43772 100644 --- a/include/llvm/BinaryFormat/COFF.h +++ b/include/llvm/BinaryFormat/COFF.h @@ -402,7 +402,7 @@ enum RelocationTypesARM64 : unsigned { IMAGE_REL_ARM64_REL32 = 0x0011, }; -enum COMDATType : unsigned { +enum COMDATType : uint8_t { IMAGE_COMDAT_SELECT_NODUPLICATES = 1, IMAGE_COMDAT_SELECT_ANY, IMAGE_COMDAT_SELECT_SAME_SIZE, -- 2.50.1