[PATCH] D17529: ELF: Implement ICF.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 19:05:19 PST 2016


On Mon, Feb 22, 2016 at 6:56 PM, Rui Ueyama <ruiu at google.com> wrote:

> On Mon, Feb 22, 2016 at 6:48 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>> silvas added inline comments.
>>
>> ================
>> Comment at: ELF/ICF.cpp:285
>> @@ +284,3 @@
>> +
>> +  const Elf_Shdr *RA = A->RelocSections[0];
>> +  const Elf_Shdr *RB = B->RelocSections[0];
>> ----------------
>> Why only the first element of RelocSections?
>>
>
> Look for "nothing wrong with sections with more than one relocation" in
> my patch.
>

Ah. Should we use
http://llvm.org/docs/doxygen/html/classllvm_1_1TinyPtrVector.html for
RelocSections then? That will save 3 pointers (on 64-bit, 24 bytes) off of
InputSectionBase, which is fairly substantial considering that before this
patch, on 64-bit InputSectionBase is 88 bytes IIRC.

-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160222/901c3a93/attachment.html>


More information about the llvm-commits mailing list