public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/58479] New: slow compilation on x86_64-linux at -O1 (and above) with -g, but checking disabled
@ 2013-09-19 19:47 su at cs dot ucdavis.edu
  2013-09-19 20:03 ` [Bug middle-end/58479] " mpolacek at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-09-19 19:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58479
           Summary: slow compilation on x86_64-linux at -O1 (and above)
                    with -g, but checking disabled
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The following code takes much longer to compile at -O1 (and above) with -g
using the current gcc trunk on x86_64-linux (in both 32-bit and 64-bit modes). 

It also affects 4.6, 4.7, and 4.8 (with checking disabled), but to a lesser
extent (4 seconds vs. 12 seconds at -O1 with -g). 

This seems to be related to 58318, but 58318 manifests only when checking is
enabled. 

This may also be related to 58478. 


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/su/software/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure
--enable-languages=c,c++,objc,obj-c++,fortran,lto --enable-checking=release
--with-gmp=/home/su/software/local/gcc-trunk
--with-mpfr=/home/su/software/local/gcc-trunk
--with-mpc=/home/su/software/local/gcc-trunk
--with-cloog=/home/su/software/local/gcc-trunk
--prefix=/home/su/software/local/gcc-trunk
Thread model: posix
gcc version 4.9.0 20130917 (experimental) (GCC) 
$
$ time gcc -O0 -g small.c
0.02user 0.00system 0:00.13elapsed 27%CPU (0avgtext+0avgdata 37888maxresident)k
0inputs+56outputs (0major+6439minor)pagefaults 0swaps
$ time gcc -O1 small.c
0.02user 0.02system 0:00.14elapsed 30%CPU (0avgtext+0avgdata 40144maxresident)k
0inputs+32outputs (0major+6560minor)pagefaults 0swaps
$ time gcc -O1 -g small.c
7.69user 0.53system 0:12.20elapsed 67%CPU (0avgtext+0avgdata
2632224maxresident)k
0inputs+32outputs (0major+180567minor)pagefaults 0swaps
$


-------------------------------------


int a, b, c, d, e, f; 

int main ()
{
  for (a = 0; a < 8; a++)
    for (b = 0; b < 8; b++)
      for (c = 0; c < 8; c++)
    for (d = 0; d < 8; d++)
      for (e = 0; e < 8; e++)
        {
          int t[3][2][9] = {
        {{f, f, f, f, f, f, f, f, f},
         {f, f, f, f, f, f, f, f, f}},
        {{f, f, f, f, f, f, f, f, f},
         {f, f, f, f, f, f, f, f, f}},
        {{f, f, f, f, f, f, f, f, f},
         {f, f, f, f, f, f, f, f, f}},
          };
        }

  return 0;
}


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

end of thread, other threads:[~2023-07-07 10:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-19 19:47 [Bug middle-end/58479] New: slow compilation on x86_64-linux at -O1 (and above) with -g, but checking disabled su at cs dot ucdavis.edu
2013-09-19 20:03 ` [Bug middle-end/58479] " mpolacek at gcc dot gnu.org
2013-09-19 20:06 ` [Bug middle-end/58479] [4.9 Regression] " mpolacek at gcc dot gnu.org
2013-09-19 20:10 ` mpolacek at gcc dot gnu.org
2014-01-20  9:56 ` [Bug middle-end/58479] [4.9 Regression] slow var-tracking " rguenth at gcc dot gnu.org
2014-01-20 10:48 ` jakub at gcc dot gnu.org
2014-03-03 14:01 ` jakub at gcc dot gnu.org
2014-03-12 15:28 ` [Bug middle-end/58479] [4.8/4.9 " jakub at gcc dot gnu.org
2014-04-22 11:37 ` [Bug middle-end/58479] [4.8/4.9/4.10 " jakub at gcc dot gnu.org
2014-07-16 13:31 ` jakub at gcc dot gnu.org
2014-10-30 10:42 ` [Bug middle-end/58479] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-06-26 20:10 ` [Bug middle-end/58479] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:36 ` jakub at gcc dot gnu.org
2021-05-14  9:46 ` [Bug middle-end/58479] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:06 ` rguenth at gcc dot gnu.org
2022-05-27  9:34 ` [Bug debug/58479] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-07-07 10:30 ` [Bug debug/58479] [11/12/13/14 " 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).