[PATCH] Simplify microsoft mangling of template instantiations

Agustín Bergé kaballo86 at hotmail.com
Thu Jun 5 22:04:33 PDT 2014


>>! In D3983#4, @majnemer wrote:
> What's the motivation behind this patch?

Efficiency.

I have been profiling the compilation of a heavily templated C++ code, for which name mangling is the dominant part. The Microsoft mangling implementation is about 4 times slower than the Itanium one for this particular case, and it's mainly due to mangling template instantiations twice. As far as I understand, there is no reason to have a back reference key different than the actual mangled name, and thus no reason to mangle template instantiations twice. After this particular change, the Microsoft mangling implementation is just about 2 times slower than the Itanium one.

http://reviews.llvm.org/D3983






More information about the cfe-commits mailing list