[cfe-dev] Speed-up PCH builds

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Wed May 20 16:24:02 PDT 2020


Judging by the lack of responses here, it feels like there aren't a lot of
active stakeholders in clang's PCH behavior.

It seems pretty clear that there is a performance use case for
instantiating templates at the end of the PCH.

I think your plan to land this under a flag sounds good, and then if other
users care we can discuss changing the default later.

On Wed, May 13, 2020 at 9:27 AM Alexandre Ganea via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hello,
>
>
>
> There’s a pending review, https://reviews.llvm.org/D69585, which greatly
> speeds up building of codebases using PCH + heavy use of templates.
>
> Previously, template instantiations would only happen at the end of the TU
> which includes the PCH. I’ve seen codebases with 5+ sec spent in each TU
> because of this.
>
> With this patch, instantiations are allowed to happen at the end of the
> PCH, which shaves a few seconds in each TU including the PCH. This behavior
> is behind a new flag.
>
>
>
> It would be much appreciated if anybody knowledgeable of the subject could
> take a look at this please?
>
>
>
> Many thanks in advance!
>
> Alex.
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200520/e3b66b06/attachment.html>


More information about the cfe-dev mailing list