[llvm-bugs] [Bug 51157] New: Possible O(n^2) slowness in Global Value Numbering

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 21 08:05:34 PDT 2021


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

            Bug ID: 51157
           Summary: Possible O(n^2) slowness in Global Value Numbering
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: wsnyder at wsnyder.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Created attachment 25044
  --> https://bugs.llvm.org/attachment.cgi?id=25044&action=edit
Examples and runtimes

This was noticed due to a much larger gcc performance bug
(https://github.com/verilator/verilator/issues/3072) but looking into this
there seems a possible clang issue also.

On clang version 10.0.0-4ubuntu1 the attached takes 37 seconds total.

  clang++ -I. -c -Os -ftime-report -o /dev/null Vara___024root__114_0.cpp

In clang++, 33 of 37 seconds are in the "Global Value Numbering" stage. The
same splitting above in this stage takes 4.6, 2.9, and 3.9 seconds
(totalling 11.3).  This thus seems a O(n^2) performance problem suspect.

This issue was originally reported using gcc 8.2.0 by Matheus Cavalcante
at https://github.com/verilator/verilator/issues/3072

-- 
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/20210721/0cffcd92/attachment.html>


More information about the llvm-bugs mailing list