[lld] r286100 - [ELF] Make InputSection<ELFT>::writeTo virtual

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 13:28:43 PST 2016


I don't know how much we could get from virtualizing writeTo (so I'm okay
to revert this for now), but if the cost of having it is sub-1% and if it
will improve readability quite a lot, I'd vote for readability over
performance. So virtualizing writeTo is still an option.

On Tue, Nov 8, 2016 at 5:08 AM, Eugene Leviant via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Okay, let's revert this than. I'll write alternative patch for .got.plt.
>
> 2016-11-08 15:42 GMT+03:00 Rafael EspĂ­ndola <rafael.espindola at gmail.com>:
> > On 8 November 2016 at 07:00, Eugene Leviant <evgeny.leviant at gmail.com>
> wrote:
> >> VMTs themselves are not allocated (AFAIK they're stored in .rodata),
> >> so I guess the problem is in extra 4/8 bytes of VMT pointer size and
> >> overhead
> >> for initialization, correct?
> >
> > Yes, in each input section.
> >
> >> For dyn_cast you have extra 4 bytes for
> >> Kind + function call + compare-and-branch. Can you provide some
> >> proofs, that it is faster?
> >> (like you did in your previous letter).
> >
> > The SectionKind only uses 3 bits in the input section. Really, the
> > issue is sizeof(InputSection<ELFT>). We are quite bounded by memory
> > access, so compacting structures is an important optimization.
> >
> > Do you have an ETA? Would you mind reverting the patch for now?
> >
> > Cheers,
> > Rafael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/f1fb98d4/attachment.html>


More information about the llvm-commits mailing list