[llvm-dev] RFC: Cleaning up the Itanium demangler

Erik Pilkington via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 22 08:34:02 PDT 2017



On 6/22/17 7:50 AM, Joerg Sonnenberger via llvm-dev wrote:
> On Wed, Jun 21, 2017 at 04:42:40PM -0700, Erik Pilkington via llvm-dev wrote:
>> I've been working on fixing this by parsing first into an AST structure, and
>> then traversing that AST to produce a demangled string. This provides a
>> significant performance improvement and also make the demangler somewhat
>> more clean.
> How does it far in terms of code size? One of the big problems with the
> libcxxabi demangler is its size. It's at least twice as large as the one
> in elftoolchain, even ignoring some possible feature differences.
Looks pretty good, I'm guessing this is because all the string 
operations aren't getting inlined into the parser anymore.
Before this patch:
__TEXT    __DATA  __OBJC    others  dec       hex
247293    0       0         1248    248541    3cadd 
libc++abi.a(cxa_demangle.cpp.o)

After this patch:
__TEXT    __DATA  __OBJC    others  dec       hex
137723    4216    0         6016    147955    241f3 
libc++abi.a(cxa_demangle.cpp.o)
>
> Joerg
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list