Avoid a second key lookup when the back reference key is going to be inserted in the StringMap. The string lookups in the msmangler are the main responsible for the huge overhead when compared to the itanium mangler. This patch makes a small but noticeable improvement.
Details
Diff Detail
Event Timeline
It seems doable at first sight. I will try adding those insert overloads to StringMap.
I think that instead of introducing a new function I should just be using mangleSourceName. A template instantiation name is a source name too (considering anonymous type names are treated as source names), it's just that their terminating '@' is currently being added at the end of the template argument list. If the argument list no longer appends the '@', then they would be treated as any other source name.
Changes in this iteration:
- Use the new StringMap::insert overload.
- Template instantiation names are source names, mangle them as such.
You probably want
See MicrosoftCXXABI::getAddrOfVTable as an example.