public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101555] New: Compile slowdown in tree PRE
@ 2021-07-21 14:56 wsnyder at wsnyder dot org
  2021-07-21 14:59 ` [Bug c++/101555] " wsnyder at wsnyder dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: wsnyder at wsnyder dot org @ 2021-07-21 14:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101555

            Bug ID: 101555
           Summary: Compile slowdown in tree PRE
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wsnyder at wsnyder dot org
  Target Milestone: ---

Running

   g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

as

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

takes 297 CPU seconds.

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

In GCC, 276 of 297 seconds are in the "tree PRE" stage. Splitting the large
function into roughly three pieces (Vara___024root__114_0.cpp, _1 and _2)
the "tree PRE" stage takes 12.7, 7.8 and 3.9 seconds (totalling 24.4).
Therefore I suspect some O(n^2) issue in tree PRE.

Note removing -Os makes gcc much faster, but still signifcantly slower than
clang.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-07-22  9:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 14:56 [Bug c++/101555] New: Compile slowdown in tree PRE wsnyder at wsnyder dot org
2021-07-21 14:59 ` [Bug c++/101555] " wsnyder at wsnyder dot org
2021-07-22  8:41 ` [Bug tree-optimization/101555] [12 Regression] " rguenth at gcc dot gnu.org
2021-07-22  9:24 ` rguenth at gcc dot gnu.org
2021-09-06 14:44 ` [Bug tree-optimization/101555] " rguenth at gcc dot gnu.org
2021-09-07  7:04 ` rguenth at gcc dot gnu.org
2021-09-07  9:14 ` cvs-commit at gcc dot gnu.org
2021-09-07  9:22 ` rguenth at gcc dot gnu.org
2022-07-22  9:48 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).