[llvm-bugs] [Bug 34356] New: Microsoft mangling takes forever with large, deeply nested templates
llvm-bugs at lists.llvm.org
Mon Aug 28 23:58:21 PDT 2017
Bug ID: 34356
Summary: Microsoft mangling takes forever with large, deeply
Assignee: unassignedclangbugs at nondot.org
Reporter: george.burgess.iv at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Split from https://bugs.llvm.org/show_bug.cgi?id=29160, in hopes of making a
more targeted bug.
To reproduce, compile the test-case from said bug with:
$ clang -target i686-windows -fms-compatibility -fmsc-version=1700 tc.cpp
(for values of N >= 15).
Looks like, as we approach -DCHUNKS=42, we're building up more and more massive
(>100MB) strings so we can potentially discard them and use a backreference
instead. (In particular, we do this in the `isTemplate()` branch in
MicrosoftCXXNameMangler::mangleUnqualifiedName). Blindly caching these sped up
execution time substantially (DCHUNKS=42 ran in ~5 minutes, instead of 35), but
also made clang use 21GB of RAM. This doesn't seem ideal.
I thought 100MB strings sounded large, but when I asked clang to -ast-dump the
program, I killed it after 2 hours and >200GB of output. So...
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs