[cfe-dev] "Automatic explicit" template instantiation?

Marcus Johnson via cfe-dev cfe-dev at lists.llvm.org
Sun Jan 6 20:37:28 PST 2019

I haven't contributed to Clang yet, and I'm not familiar with IBM's
anything really, but I feel like your proposal is beating around the bush a

In my opinion, Clang is too deeply coupled and adheres too closely to the
OOP style.

For example, the Sena class is over 10,000 lines, all by it's self.

That to me is an indication that it's trying to do too much.

I don't believe in hard limits, but my modules are around 1000-1200 lines
total, including both the struct definitions and function definitions that
operate on them.

Hell, my (slightly minimal but not overly so) Unicode library which
supports UTF-8, UTF-16, and UTF-32 is only about 3200 lines, and it
includes a string formatting subsystem and String to Number and Number to
String subsystems...

My point is that Clang's abstraction layers aren't broken down in the
correct places, and it could use some serious refactoring.

On Sunday, January 6, 2019, Bouman, N.J. via cfe-dev <cfe-dev at lists.llvm.org>

> Dear Clang developers,
> In order to get better re-compilation speeds for heavily templated code,
> it is sometimes suggested to move the definition of a template out of a
> header file, and use explicit instantiation.
> It seems that IBM’s C++ compiler features a technique (“tempinc”) that can
> generate such explicit instantiations automatically, as long as the
> developer adheres to some rules. See, for example:
> http://www.msg.ucsf.edu/local/programs/IBM_Compilers/C:C++/
> html/compiler/ref/tutmplat5.htm
> Note that I have never used the IBM compiler and its “tempinc” technique
> myself,
> but I was wondering whether people on this list are familiar with and/or
> have experience with this technique and whether it has been considered for
> inclusion into Clang (or why it was rejected).
> Kind regards,
> Niek J Bouman
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://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/20190106/07626d83/attachment.html>

More information about the cfe-dev mailing list