From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22999 invoked by alias); 20 Feb 2014 14:02:05 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22937 invoked by uid 48); 20 Feb 2014 14:01:56 -0000 From: "slyfox at inbox dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60291] New: slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs) Date: Thu, 20 Feb 2014 14:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at inbox dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg02121.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291 Bug ID: 60291 Summary: slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs) Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at inbox dot ru Created attachment 32182 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32182&action=edit ghc14232_3.hc.i.bz2 - compressed source file (30MBs uncompressed) GHC (glasgow haskell compiler) in it's portable mode generates intermediate .C source files. Sometimes they are really large: 20-100 MB. Even on core-i7 building such files takes: 3-5 minutes. On slower boxes/arches things are worse and go up to 20-60 minutes. clang does not seem to have such problems [1]. gcc version should not be very relevant. Time test are for [2]. If the problem is hard to fix in gcc what options would you suggest to enable to get sane build times? -fno-unit-at-a-time does not seem to help. Thanks! [1]: [sf] /tmp/__z:time gcc -O0 -Wno-ignored-attributes -c ghc14232_3.hc.i -o gcc.o real 5m19.975s user 5m18.403s sys 0m0.629s [sf] /tmp/__z:time gcc -O1 -Wno-ignored-attributes -c ghc14232_3.hc.i -o gcc.o real 3m0.557s user 2m58.496s sys 0m0.623s [sf] /tmp/__z:time gcc -O2 -Wno-ignored-attributes -c ghc14232_3.hc.i -o gcc.o real 3m21.315s user 3m19.691s sys 0m0.550s [sf] /tmp/__z:time clang -O0 -Wno-ignored-attributes -c ghc14232_3.hc.i -o clang.o real 0m19.661s user 0m19.356s sys 0m0.234s [sf] /tmp/__z:time clang -O1 -Wno-ignored-attributes -c ghc14232_3.hc.i -o clang.o real 0m49.612s user 0m49.145s sys 0m0.295s [sf] /tmp/__z:time clang -O2 -Wno-ignored-attributes -c ghc14232_3.hc.i -o clang.o real 0m48.991s user 0m48.539s sys 0m0.278s [2]: Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.2/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /subvolumes/var_tmp/portage/sys-devel/gcc-4.8.2-r1/work/gcc-4.8.2/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/python --enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.2-r1 p1.4-ssptest, pie-0.5.9-ssptest' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap --disable-libssp --enable-lto --without-cloog Thread model: posix gcc version 4.8.2 (Gentoo 4.8.2-r1 p1.4-ssptest, pie-0.5.9-ssptest)