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

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


On Tue, Nov 8, 2016 at 2:48 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> On 8 November 2016 at 16:28, Rui Ueyama <ruiu at google.com> wrote:
> > 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.
>
>
> Any thought on the idea of having a SyntheticSection class? That can
> be the first one with virtual functions.
>

It may work, but with that we'll have to write something like "if it's
synthetic, use writeTo to copy it to output, otherwise memcpy its Data to
output", so there's some cost on human side instead of on computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/5c022b26/attachment.html>


More information about the llvm-commits mailing list