[lld] r234808 - ELF: Move definitions from {Dynamic, ELF}File.h to .cpp files.

Simon Atanasyan simon at atanasyan.com
Mon Apr 13 22:06:24 PDT 2015


On Tue, Apr 14, 2015 at 1:52 AM, Rui Ueyama <ruiu at google.com> wrote:
> Author: ruiu
> Date: Mon Apr 13 17:52:11 2015
> New Revision: 234808
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234808&view=rev
> Log:
> ELF: Move definitions from {Dynamic,ELF}File.h to .cpp files.
>
> DynamicFile and ELFFile are instantiated for four different types,
> ELF{32,64}{BE,LE}. Because the classes are instantiated in each
> compilation unit, including the header file makes object files
> 10MB larger.
>
> On Windows, issue of excessive template instantiation is critical,
> since the regular COFF file supports only up to 65534 sections.
> (We could use the extended COFF file format, but generating that
> much COMDAT sections is not a good thing in the first place
> because it means long compile time and long link time.)
>
> I confirmed that this change makes AArch64TargetHandler.cpp.o
> from 21MB to 8.5MB. It feels still too large, but I think it's
> a good start.

Awesome! That is a good reason to avoid attempts to solve the problem
on a weekend :)

-- 
Simon



More information about the llvm-commits mailing list