[PATCH] D36427: [libcxxabi][demangler] Improve representation of substitutions/templates

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 7 13:44:59 PDT 2017


erik.pilkington created this revision.

This patch changes the demangler so that it represents substitutions/templates more linearly. Previously, substitions were represented by a `vector<vector<Node*>>` and template parameter substitutions by a `vector<vector<vector<Node*>>>`! I wrote a comment in SubTable describing how this is done. 
This patch gives a 20%-25% time reduction to demangle the symbols in LLVM, a 25% reduction in code size for the demangler on my machine, and makes the demangler a lot easier to read, IMO.

Thanks for taking a look!
Erik


https://reviews.llvm.org/D36427

Files:
  src/cxa_demangle.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36427.110080.patch
Type: text/x-patch
Size: 28585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170807/c284d6d4/attachment-0001.bin>


More information about the cfe-commits mailing list