[PATCH] D62746: msabi: Fix exponential mangling time in certain pathological inputs

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 31 13:09:23 PDT 2019


thakis created this revision.
thakis added a reviewer: rnk.

Template back references used to be recursively recomputed, add a
memoization cache to cut down on this.

Since there are now two different types of argument maps, rename the
existing TypeBackReferences to FunArgBackReferences, and rename
mangleArgumentType() to mangleFunctionArgumentType().

Fixes PR42091, the input there now takes 50ms instead of 7s to compile.

No intended behavior change.


https://reviews.llvm.org/D62746

Files:
  clang/lib/AST/MicrosoftMangle.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62746.202472.patch
Type: text/x-patch
Size: 8444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190531/2bf47e3a/attachment.bin>


More information about the cfe-commits mailing list