[llvm-bugs] [Bug 42091] [ms] Template backref mangling is orders of magnitude slower than in Itanium ABI

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 1 05:43:08 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42091

Nico Weber <nicolasweber at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #5 from Nico Weber <nicolasweber at gmx.de> ---
This is still not fixed if the recursion happens outside the 10 slots with
backrefs, the following still takes 20s:


template <class T1, class T2, class T3, class T4, class T5, class T6, class T7,
          class T8, class T9, class T10, class T11, class T12, class T13,
          class T14, class T15, class T16, class T17, class T18, class T19,
          class T20>
struct Food {};

using B0 = Food<int, int, int, int, int, int, int, int, int, int,  int, int,
int, int, int, int, int, int, int, int>;
using B1 = Food<B0, B0, B0, B0, B0, B0, B0, B0, B0, B0,  B0, B0, B0, B0, B0,
B0, B0, B0, B0, B0>;
using B2 = Food<B0, B0, B0, B0, B0, B0, B0, B0, B0, B0,  B1, B1, B1, B1, B1,
B1, B1, B1, B1, B1>;
using B3 = Food<B1, B1, B0, B0, B0, B0, B0, B0, B0, B0,  B2, B2, B2, B2, B2,
B2, B2, B2, B2, B2>;
using B4 = Food<B2, B2, B1, B0, B0, B0, B0, B0, B0, B0,  B3, B3, B3, B3, B3,
B3, B3, B3, B3, B3>;
using B5 = Food<B3, B3, B2, B1, B0, B0, B0, B0, B0, B0,  B4, B4, B4, B4, B4,
B4, B4, B4, B4, B4>;
using B6 = Food<B4, B4, B3, B2, B1, B0, B0, B0, B0, B0,  B5, B5, B5, B5, B5,
B5, B5, B5, B5, B5>;
using B7 = Food<B5, B4, B3, B2, B1, B0, B0, B0, B0, B0,  B6, B6, B6, B6, B6,
B6, B6, B6, B6, B6>;

// This too should take milliseconds, not minutes.
void f(B7 a) {}



If there isn't a backref, need to have a 2nd-level cache for the strings
themselves.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190601/d8f18f44/attachment.html>


More information about the llvm-bugs mailing list