[PATCH] D26006: Further reduce the number of allocators

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 26 20:18:16 PDT 2016


Currently we have three allocators for each input file. What if we should
use three global allocators?

On Wed, Oct 26, 2016 at 7:00 PM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> It changes where things are allocated from. Right now every file has 3
> allocators for the sections. With the patch all of them use a common
> allocator, so stuff from the same file is closer together. We also don't
> fragment memory as much.
>
>
>
>
> On October 26, 2016 8:02:22 PM EDT, Rui Ueyama <ruiu at google.com> wrote:
>>
>> ruiu added a comment.
>>
>> I don't think I fully understand why this can make things faster. This patch replaces
>>
>>   llvm::SpecificBumpPtrAllocator<[derived class of InputSection]>
>>
>> with
>>
>>   std::unique_ptr<InputSection>,
>>
>> so the number of allocations and the number of deallocation (which should be zero if _exit is called) don't change, IIUC.
>>
>>
>> https://reviews.llvm.org/D26006
>>
>>
>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161026/be868160/attachment.html>


More information about the llvm-commits mailing list