public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59868] New: Extremely slow compile times
@ 2014-01-18  0:40 mikesart at gmail dot com
  2014-01-18  0:41 ` [Bug c++/59868] " mikesart at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: mikesart at gmail dot com @ 2014-01-18  0:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59868

            Bug ID: 59868
           Summary: Extremely slow compile times
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mikesart at gmail dot com

Building attached file takes ~20 minutes with gcc 4.8.1. Clang 3.3 builds in
~17 seconds. I'm happy to provide the blah.ii and blah.s files from the below
command as well, but it bumped the zip file size over 1MB so I've skipped them
for now. Please let me know if there is any other information I can provide.
Thanks.
 -Mike

mikesart@mikesart-petra:/tmp/gcc48slow$ time /usr/bin/gcc-4.8 -v -save-temps -g
-fno-strict-aliasing -fno-math-errno -fvisibility=hidden -fPIC -g -O2 -o blah.o
-c blah.cpp         
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc-4.8
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.8.1-10ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-fno-strict-aliasing'
'-fno-math-errno' '-fvisibility=hidden' '-fPIC' '-g' '-O2' '-o' 'blah.o' '-c'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -E -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE blah.cpp -mtune=generic -march=x86-64
-fno-strict-aliasing -fno-math-errno -fvisibility=hidden -fPIC -g -g
-fworking-directory -O2 -fpch-preprocess -fstack-protector -Wformat
-Wformat-security -o blah.ii
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.8"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.8
 /usr/include/x86_64-linux-gnu/c++/4.8
 /usr/include/c++/4.8/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-g' '-fno-strict-aliasing'
'-fno-math-errno' '-fvisibility=hidden' '-fPIC' '-g' '-O2' '-o' 'blah.o' '-c'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -fpreprocessed blah.ii -quiet
-dumpbase blah.cpp -mtune=generic -march=x86-64 -auxbase-strip blah.o -g -g -O2
-version -fno-strict-aliasing -fno-math-errno -fvisibility=hidden -fPIC
-fstack-protector -Wformat -Wformat-security -o blah.s
GNU C++ (Ubuntu/Linaro 4.8.1-10ubuntu9) version 4.8.1 (x86_64-linux-gnu)
        compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version
3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Ubuntu/Linaro 4.8.1-10ubuntu9) version 4.8.1 (x86_64-linux-gnu)
        compiled by GNU C version 4.8.1, GMP version 5.1.2, MPFR version
3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d4f6b5538c661bdd4dde0c4673c032a4


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

* [Bug c++/59868] Extremely slow compile times
  2014-01-18  0:40 [Bug c++/59868] New: Extremely slow compile times mikesart at gmail dot com
@ 2014-01-18  0:41 ` mikesart at gmail dot com
  2014-01-18  0:43 ` mikesart at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mikesart at gmail dot com @ 2014-01-18  0:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59868

--- Comment #1 from Michael Sartain <mikesart at gmail dot com> ---
Created attachment 31881
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31881&action=edit
blah.cpp file (from running gcc -E)


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

* [Bug c++/59868] Extremely slow compile times
  2014-01-18  0:40 [Bug c++/59868] New: Extremely slow compile times mikesart at gmail dot com
  2014-01-18  0:41 ` [Bug c++/59868] " mikesart at gmail dot com
@ 2014-01-18  0:43 ` mikesart at gmail dot com
  2014-01-18  3:58 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mikesart at gmail dot com @ 2014-01-18  0:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59868

--- Comment #2 from Michael Sartain <mikesart at gmail dot com> ---
Created attachment 31882
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31882&action=edit
Assembly output from -save-temps


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

* [Bug c++/59868] Extremely slow compile times
  2014-01-18  0:40 [Bug c++/59868] New: Extremely slow compile times mikesart at gmail dot com
  2014-01-18  0:41 ` [Bug c++/59868] " mikesart at gmail dot com
  2014-01-18  0:43 ` mikesart at gmail dot com
@ 2014-01-18  3:58 ` hjl.tools at gmail dot com
  2014-01-20  9:10 ` [Bug c++/59868] Extremely slow compile times with -g (var-tracking) rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2014-01-18  3:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59868

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
Another VTA time hog.  Try add -fno-var-tracking-assignments.


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

* [Bug c++/59868] Extremely slow compile times with -g (var-tracking)
  2014-01-18  0:40 [Bug c++/59868] New: Extremely slow compile times mikesart at gmail dot com
                   ` (2 preceding siblings ...)
  2014-01-18  3:58 ` hjl.tools at gmail dot com
@ 2014-01-20  9:10 ` rguenth at gcc dot gnu.org
  2014-01-20  9:49 ` rguenth at gcc dot gnu.org
  2014-01-20 17:41 ` mikesart at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-20  9:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59868

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog
            Summary|Extremely slow compile      |Extremely slow compile
                   |times                       |times with -g
                   |                            |(var-tracking)

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Or -fno-var-tracking.


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

* [Bug c++/59868] Extremely slow compile times with -g (var-tracking)
  2014-01-18  0:40 [Bug c++/59868] New: Extremely slow compile times mikesart at gmail dot com
                   ` (3 preceding siblings ...)
  2014-01-20  9:10 ` [Bug c++/59868] Extremely slow compile times with -g (var-tracking) rguenth at gcc dot gnu.org
@ 2014-01-20  9:49 ` rguenth at gcc dot gnu.org
  2014-01-20 17:41 ` mikesart at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-20  9:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59868

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-01-20
     Ever confirmed|0                           |1

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
With plain -O1 we also get

 alias stmt walking      :  14.78 (19%) usr   0.10 ( 6%) sys  14.90 (19%) wall 
     0 kB ( 0%) ggc
 tree SSA incremental    :  31.81 (41%) usr   0.01 ( 1%) sys  31.82 (40%) wall 
  6645 kB ( 1%) ggc

ick.  Similar to old KDE testcases with a very big initializer function.
Here it is 30000 lines gli_init_gl_entrypoint_descs (I suppose auto-generated).
>From a quick look it's a single gigantic basic-block doing a sequence of
global stores.


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

* [Bug c++/59868] Extremely slow compile times with -g (var-tracking)
  2014-01-18  0:40 [Bug c++/59868] New: Extremely slow compile times mikesart at gmail dot com
                   ` (4 preceding siblings ...)
  2014-01-20  9:49 ` rguenth at gcc dot gnu.org
@ 2014-01-20 17:41 ` mikesart at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: mikesart at gmail dot com @ 2014-01-20 17:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59868

--- Comment #6 from Michael Sartain <mikesart at gmail dot com> ---
Added -fno-var-tracking and build time dropped to 1:30.

Is this something that I should revisit when gcc 4.9 is released?

Thanks much for the help.


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

end of thread, other threads:[~2014-01-20 17:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-18  0:40 [Bug c++/59868] New: Extremely slow compile times mikesart at gmail dot com
2014-01-18  0:41 ` [Bug c++/59868] " mikesart at gmail dot com
2014-01-18  0:43 ` mikesart at gmail dot com
2014-01-18  3:58 ` hjl.tools at gmail dot com
2014-01-20  9:10 ` [Bug c++/59868] Extremely slow compile times with -g (var-tracking) rguenth at gcc dot gnu.org
2014-01-20  9:49 ` rguenth at gcc dot gnu.org
2014-01-20 17:41 ` mikesart at gmail dot com

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).