aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineSink.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-09-25 19:43:56 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-09-25 19:43:56 +0000
commit0d0560c37ad7edd1327eff73826f87bd8964c4b6 (patch)
treeffb65a03b2c37c819c9d798d99bd55d5344acdaf /llvm/lib/CodeGen/MachineSink.cpp
parentb3185e710e797b441c042a942d812eaf6b01ad4a (diff)
downloadllvm-0d0560c37ad7edd1327eff73826f87bd8964c4b6.zip
llvm-0d0560c37ad7edd1327eff73826f87bd8964c4b6.tar.gz
llvm-0d0560c37ad7edd1327eff73826f87bd8964c4b6.tar.bz2
MS ABI: Avoid hashing back reference keys in mangler
This patch replaces the back reference StringMap from the MS mangler with a SmallVector of strings. 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. Patch by Agustín Bergé. llvm-svn: 218461
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
0 files changed, 0 insertions, 0 deletions