[PATCH] D46145: Use a buffer when allocating relocations

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 08:26:21 PDT 2018


grimar added a comment.

In https://reviews.llvm.org/D46145#1081117, @ruiu wrote:

> I wonder if you can make a guess on how many relocations will be inserted to the vector. We know the number of relocations for each input section, so calling reserve() might work.


I think `reserve()` is exactly what causes high peaks now. We already call it. See:
https://github.com/llvm-mirror/lld/blob/master/ELF/Relocations.cpp#L1020


https://reviews.llvm.org/D46145





More information about the llvm-commits mailing list