[llvm-bugs] [Bug 34562] New: O(n^2) behavior building debug info for large structs

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 11 14:15:31 PDT 2017


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

            Bug ID: 34562
           Summary: O(n^2) behavior building debug info for large structs
           Product: libraries
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: djones at xtreme-eda.com
                CC: llvm-bugs at lists.llvm.org

My application can at times create structs with 100,000+ members.  It appears
that generating debug info for these structs has quadratic-ish behavior.

The attached IR file contains no code, however, it takes several minutes to
load into opt/llc due to the large amount of debug info.

It appears that uniquing metadata is O(N), and when you have N items of
metadata, the whole process is O(N^2) which is noticeable for large N.

I found this originally with LLVM 3.9, but it is also present in 5.0 rc2, and
likely in the 5.0 release.

-- 
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/20170911/471da881/attachment.html>


More information about the llvm-bugs mailing list