Improving PCH build times by instantiating templates in the PCH

Hello,

would there be somebody who could review https://reviews.llvm.org/D69585 so
that it can make it into 10.0? I can get significant build time reduction
with the patch when using PCHs (up to 20-30% build time,
http://llunak.blogspot.com/2019/11/clang-precompiled-headers-and-improving.html),
the patch is fairly simple, I've been using it locally for several months by
now, and it should be pretty safe given that the change is in effect only if
opted in.

Thank you.

FWIW, I would really like to see this patch move forward as it has the potential to speed up precompiled headers quite significantly. Currently our internal builds using clang-cl are about 3x slower than MSVC using PCH, and it’s likely in large part due to this exact issue.

FWIW, I would really like to see this patch move forward as it has the
potential to speed up precompiled headers quite significantly.
our internal builds using clang-cl are about 3x slower than MSVC using PCH,
and it's likely in large part due to this exact issue.

You could try also using flags from https://reviews.llvm.org/D69778 , which I
pushed yesterday. But I don't know if they'll make much of a difference
without this main PCH patch, which given today's branching for 10.0 has
missed the bus there I guess :frowning: ?