[PATCH] D26006: Further reduce the number of allocators
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 11:13:03 PDT 2016
On Thu, Oct 27, 2016 at 6:44 AM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> On 26 October 2016 at 23:18, Rui Ueyama <ruiu at google.com> wrote:
> > Currently we have three allocators for each input file. What if we should
> > use three global allocators?
>
> Yes, that worked. Thanks!
>
Awesome!
What we are observing here is that almost all "large" objects, such as
files, sections or symbols, are used for the entire lifetime of the linker
once they are created. This usage characteristic makes it attractive to use
an arena allocator where the entire linker is one arena. With an arena,
newly created objects belong to the arena and freed all at once once
everything is done. Your global allocator patch is aligned to that concept,
and I think we should rewrite more code in that direction as it is
efficient and easy to understand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161027/3868366a/attachment.html>
More information about the llvm-commits
mailing list