public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/104120] New: slow compilation with only "-g3 -O1"; other opt levels are fine
@ 2022-01-19 15:23 cnsun at uwaterloo dot ca
  2022-01-19 16:00 ` [Bug c/104120] [10/11/12 Regression] slow compilation with only "-g3 -O1"; other opt levels are fine since r10-15-gf179b64e3ab013ff marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: cnsun at uwaterloo dot ca @ 2022-01-19 15:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104120
           Summary: slow compilation with only "-g3 -O1"; other opt levels
                    are fine
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ cat t.c 
void acc_routine(void) {
  int i, j, k, sum, diff;
  for (i = 0; i < 10; i++)
    for (j = 0; j < 10; j++)
      for (k = 0; k < 10; k++)
        sum = 1;
  for (i = 0; i < 10; i++)
    for (j = 0; j < 10; j++)
      for (k = 0; k < 10; k++)
        sum = 1;
  for (i = 0; i < 10; i++)
    for (j = 0; j < 10; j++)
      for (k = 0; k < 10; k++)
        sum = 1;
  for (i = 0; i < 10; i++)
    for (j = 0; j < 10; j++)
      for (k = 0; k < 10; k++)
        sum = 1;
  for (i = 0; i < 10; i++)
    for (j = 0; j < 10; j++)
      for (k = 0; k < 10; k++)
        sum = 1;
}
$ 
$ time gcc-trunk -c -g3 t.c -O1

real    0m43.205s
user    0m43.137s
sys     0m0.054s
$ 
$ time gcc-trunk -c -g3 t.c -O0

real    0m0.034s
user    0m0.022s
sys     0m0.012s
$ time gcc-trunk -c t.c -O1

real    0m0.043s
user    0m0.037s
sys     0m0.006s
$ 
$ time gcc-trunk -c t.c -O2

real    0m0.033s
user    0m0.027s
sys     0m0.007s
$ time gcc-trunk -c t.c -O3

real    0m0.032s
user    0m0.017s
sys     0m0.015s
$ 
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.2nPqmFoxaU-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220119 (experimental) [master -g1ead972ce] (GCC)

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19 15:23 [Bug c/104120] New: slow compilation with only "-g3 -O1"; other opt levels are fine cnsun at uwaterloo dot ca
2022-01-19 16:00 ` [Bug c/104120] [10/11/12 Regression] slow compilation with only "-g3 -O1"; other opt levels are fine since r10-15-gf179b64e3ab013ff marxin at gcc dot gnu.org
2022-01-20  2:04 ` [Bug debug/104120] " pinskia at gcc dot gnu.org
2022-01-20  2:04 ` pinskia at gcc dot gnu.org
2022-01-20  7:51 ` rguenth at gcc dot gnu.org
2022-03-09 13:28 ` rguenth at gcc dot gnu.org
2022-06-28 10:47 ` [Bug debug/104120] [10/11/12/13 " jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug debug/104120] [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).