public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110257] New: [13 Regression] Excessive compile time and memory consumption
@ 2023-06-14 18:32 manuel.bergler at mvtec dot com
2023-06-14 18:36 ` [Bug c++/110257] " manuel.bergler at mvtec dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: manuel.bergler at mvtec dot com @ 2023-06-14 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110257
Bug ID: 110257
Summary: [13 Regression] Excessive compile time and memory
consumption
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: manuel.bergler at mvtec dot com
Target Milestone: ---
Compiling the attached file with GCC 13.1 consumes ~95GB of RAM and takes 23
minutes to compile, compared to GCC 12.1 which required only ~250KB of RAM and
only takes 1.8s.
File was compiled with command
g++ -O3 -g -std=c++20 -c a-exploding_compilation_time.ii
There are no warnings or other output when compiling this file, it just takes
forever.
gcc -v reports:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure
--enable-languages=ada,c,c++,d,fortran,go,lto,objc,obj-c++ --enable-bootstrap
--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--with-build-config=bootstrap-lto --with-linker-hash-style=gnu
--with-system-zlib --enable-__cxa_atexit --enable-cet=auto
--enable-checking=release --enable-clocale=gnu --enable-default-pie
--enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object
--enable-libstdcxx-backtrace --enable-link-serialization=1
--enable-linker-build-id --enable-lto --enable-multilib --enable-plugin
--enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch
--disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.1 20230429 (GCC)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/110257] [13 Regression] Excessive compile time and memory consumption
2023-06-14 18:32 [Bug c++/110257] New: [13 Regression] Excessive compile time and memory consumption manuel.bergler at mvtec dot com
@ 2023-06-14 18:36 ` manuel.bergler at mvtec dot com
2023-06-14 18:38 ` manuel.bergler at mvtec dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: manuel.bergler at mvtec dot com @ 2023-06-14 18:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110257
--- Comment #1 from Manuel Bergler <manuel.bergler at mvtec dot com> ---
Created attachment 55322
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55322&action=edit
Source file that reproduces the problem; I couldn't attach the pre-processed
file because it exceeds the file size limit
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/110257] [13 Regression] Excessive compile time and memory consumption
2023-06-14 18:32 [Bug c++/110257] New: [13 Regression] Excessive compile time and memory consumption manuel.bergler at mvtec dot com
2023-06-14 18:36 ` [Bug c++/110257] " manuel.bergler at mvtec dot com
@ 2023-06-14 18:38 ` manuel.bergler at mvtec dot com
2023-06-14 19:03 ` [Bug c++/110257] [13 Regression] Excessive compilation " pinskia at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: manuel.bergler at mvtec dot com @ 2023-06-14 18:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110257
Manuel Bergler <manuel.bergler at mvtec dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #55322|Source file that reproduces |Source file that reproduces
description|the problem; I couldn't |the problem
|attach the pre-processed |
|file because it exceeds the |
|file size limit |
--- Comment #2 from Manuel Bergler <manuel.bergler at mvtec dot com> ---
Comment on attachment 55322
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55322
Source file that reproduces the problem
I couldn't attach the pre-processed file because it exceeds the file size limit
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/110257] [13 Regression] Excessive compilation time and memory consumption
2023-06-14 18:32 [Bug c++/110257] New: [13 Regression] Excessive compile time and memory consumption manuel.bergler at mvtec dot com
2023-06-14 18:36 ` [Bug c++/110257] " manuel.bergler at mvtec dot com
2023-06-14 18:38 ` manuel.bergler at mvtec dot com
@ 2023-06-14 19:03 ` pinskia at gcc dot gnu.org
2023-06-14 21:14 ` manuel.bergler at mvtec dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-14 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110257
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|12.1.0 |12.3.0
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Works fast on the trunk:
[apinski@xeond2 upstream-gcc-git]$ ~/upstream-gcc/bin/gcc -S -g t5.cc
-std=c++20 -O3 -ftime-report
Time variable usr sys wall
GGC
phase setup : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
1770k ( 1%)
phase parsing : 1.06 ( 39%) 0.47 ( 57%) 1.53 ( 43%)
63M ( 37%)
phase lang. deferred : 1.62 ( 59%) 0.35 ( 42%) 1.98 ( 55%)
97M ( 58%)
phase opt and generate : 0.04 ( 1%) 0.01 ( 1%) 0.04 ( 1%)
6431k ( 4%)
phase last asm : 0.01 ( 0%) 0.00 ( 0%) 0.02 ( 1%)
377k ( 0%)
phase finalize : 0.00 ( 0%) 0.00 ( 0%) 0.02 ( 1%)
0 ( 0%)
|name lookup : 0.26 ( 10%) 0.10 ( 12%) 0.47 ( 13%)
3816k ( 2%)
|overload resolution : 0.90 ( 33%) 0.22 ( 27%) 1.26 ( 35%)
61M ( 36%)
garbage collection : 0.46 ( 17%) 0.00 ( 0%) 0.46 ( 13%)
0 ( 0%)
callgraph construction : 0.04 ( 1%) 0.01 ( 1%) 0.04 ( 1%)
6428k ( 4%)
preprocessing : 0.14 ( 5%) 0.09 ( 11%) 0.22 ( 6%)
1619k ( 1%)
parser (global) : 0.17 ( 6%) 0.17 ( 20%) 0.29 ( 8%)
16M ( 10%)
parser struct body : 0.15 ( 5%) 0.00 ( 0%) 0.17 ( 5%)
10M ( 6%)
parser function body : 0.00 ( 0%) 0.01 ( 1%) 0.00 ( 0%)
221k ( 0%)
parser inl. func. body : 0.04 ( 1%) 0.02 ( 2%) 0.10 ( 3%)
3111k ( 2%)
parser inl. meth. body : 0.10 ( 4%) 0.05 ( 6%) 0.16 ( 4%)
6386k ( 4%)
template instantiation : 1.41 ( 52%) 0.44 ( 53%) 1.84 ( 51%)
95M ( 57%)
constant expression evaluation : 0.06 ( 2%) 0.01 ( 1%) 0.12 ( 3%)
1000k ( 1%)
constraint normalization : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
153k ( 0%)
constraint satisfaction : 0.01 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
414k ( 0%)
varconst : 0.03 ( 1%) 0.00 ( 0%) 0.01 ( 0%)
0 ( 0%)
symout : 0.12 ( 4%) 0.03 ( 4%) 0.14 ( 4%)
25M ( 15%)
TOTAL : 2.73 0.83 3.60
169M
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/110257] [13 Regression] Excessive compilation time and memory consumption
2023-06-14 18:32 [Bug c++/110257] New: [13 Regression] Excessive compile time and memory consumption manuel.bergler at mvtec dot com
` (2 preceding siblings ...)
2023-06-14 19:03 ` [Bug c++/110257] [13 Regression] Excessive compilation " pinskia at gcc dot gnu.org
@ 2023-06-14 21:14 ` manuel.bergler at mvtec dot com
2023-06-14 21:17 ` pinskia at gcc dot gnu.org
2023-06-14 21:18 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: manuel.bergler at mvtec dot com @ 2023-06-14 21:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110257
--- Comment #4 from Manuel Bergler <manuel.bergler at mvtec dot com> ---
I don't know if it helps find the offending commit and/or fix, but these are
the numbers I got from -ftime-report with the broken GCC 13.1:
Time variable usr sys wall
GGC
phase setup : 0.01 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
1763k ( 0%)
phase parsing : 0.83 ( 0%) 0.34 ( 1%) 1.30 ( 0%)
62M ( 0%)
phase lang. deferred :1327.73 (100%) 59.04 ( 99%)1386.92 (100%)
88645M (100%)
phase opt and generate : 0.02 ( 0%) 0.02 ( 0%) 0.03 ( 0%)
6489k ( 0%)
phase last asm : 0.01 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
354k ( 0%)
|name lookup : 0.30 ( 0%) 0.07 ( 0%) 0.39 ( 0%)
3750k ( 0%)
|overload resolution : 36.61 ( 3%) 0.94 ( 2%) 37.63 ( 3%)
60M ( 0%)
garbage collection : 1.00 ( 0%) 0.10 ( 0%) 1.10 ( 0%)
0 ( 0%)
callgraph construction : 0.02 ( 0%) 0.02 ( 0%) 0.03 ( 0%)
6486k ( 0%)
preprocessing : 0.13 ( 0%) 0.10 ( 0%) 0.32 ( 0%)
1628k ( 0%)
parser (global) : 0.14 ( 0%) 0.11 ( 0%) 0.32 ( 0%)
16M ( 0%)
parser struct body : 0.13 ( 0%) 0.03 ( 0%) 0.11 ( 0%)
10M ( 0%)
parser function body : 0.00 ( 0%) 0.00 ( 0%) 0.01 ( 0%)
216k ( 0%)
parser inl. func. body : 0.05 ( 0%) 0.02 ( 0%) 0.05 ( 0%)
2629k ( 0%)
parser inl. meth. body : 0.08 ( 0%) 0.03 ( 0%) 0.15 ( 0%)
7090k ( 0%)
template instantiation : 10.21 ( 1%) 0.48 ( 1%) 10.79 ( 1%)
95M ( 0%)
constant expression evaluation :1247.10 ( 94%) 57.06 ( 96%)1304.35 ( 94%)
88547M (100%)
varconst : 0.02 ( 0%) 0.00 ( 0%) 0.00 ( 0%)
0 ( 0%)
symout : 69.71 ( 5%) 1.45 ( 2%) 71.03 ( 5%)
26M ( 0%)
TOTAL :1328.60 59.40 1388.27
88716M
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/110257] [13 Regression] Excessive compilation time and memory consumption
2023-06-14 18:32 [Bug c++/110257] New: [13 Regression] Excessive compile time and memory consumption manuel.bergler at mvtec dot com
` (3 preceding siblings ...)
2023-06-14 21:14 ` manuel.bergler at mvtec dot com
@ 2023-06-14 21:17 ` pinskia at gcc dot gnu.org
2023-06-14 21:18 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-14 21:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110257
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=109678
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Manuel Bergler from comment #4)
> I don't know if it helps find the offending commit and/or fix, but these are
> the numbers I got from -ftime-report with the broken GCC 13.1:
Yes it does. PR 109678
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/110257] [13 Regression] Excessive compilation time and memory consumption
2023-06-14 18:32 [Bug c++/110257] New: [13 Regression] Excessive compile time and memory consumption manuel.bergler at mvtec dot com
` (4 preceding siblings ...)
2023-06-14 21:17 ` pinskia at gcc dot gnu.org
@ 2023-06-14 21:18 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-14 21:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110257
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> gcc version 13.1.1 20230429 (GCC)
This is before the fix for PR 109678 .
So marking this as a dup of bug 109678 .
*** This bug has been marked as a duplicate of bug 109678 ***
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-06-14 21:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 18:32 [Bug c++/110257] New: [13 Regression] Excessive compile time and memory consumption manuel.bergler at mvtec dot com
2023-06-14 18:36 ` [Bug c++/110257] " manuel.bergler at mvtec dot com
2023-06-14 18:38 ` manuel.bergler at mvtec dot com
2023-06-14 19:03 ` [Bug c++/110257] [13 Regression] Excessive compilation " pinskia at gcc dot gnu.org
2023-06-14 21:14 ` manuel.bergler at mvtec dot com
2023-06-14 21:17 ` pinskia at gcc dot gnu.org
2023-06-14 21:18 ` pinskia 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).