[PATCH] MS ABI: Avoid hashing back reference keys in mangler
Agustín Bergé
kaballo86 at hotmail.com
Sun Sep 21 12:37:11 PDT 2014
Hi majnemer, timurrrr, chandlerc,
This patch replaces the back reference `StringMap` from the MS mangler with a `SmallVector` of `string`s. My previous patches reduced the number of hashes involved in back reference lookups, this one removes them completely. The back reference map contains at most 10 entries, which are likely to be of varying sizes and different initial subsequences, and which can easily became huge (due to templates and namespaces).
The solution presented is the simplest possible one. Nevertheless, it's enough to reduce compilation times for a particular test case from 11.1s to 9s, versus 8.58s for the Itanium ABI. Possible further improvements include using a sorted vector (carefully to not introduce an extra comparison), storing the string contents in a common arena, and/or keep the string storage in the context for reuse.
http://reviews.llvm.org/D5430
Files:
lib/AST/MicrosoftMangle.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5430.13912.patch
Type: text/x-patch
Size: 1580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140921/18425bc5/attachment.bin>
More information about the cfe-commits
mailing list