public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/54896] New: Some optimization slowness with GCC 4.7.2
@ 2012-10-10 21:28 tammy at Cadence dot COM
  2012-10-10 22:04 ` [Bug c/54896] " steven at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: tammy at Cadence dot COM @ 2012-10-10 21:28 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54896
           Summary: Some optimization slowness with GCC 4.7.2
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tammy@Cadence.COM


We have some code which consist from switch with many cases and non-random
memory writes. Look like there is nothing to optimize at all, but compiling
optimized version takes long time.

Attach is the code to generate source code to reproduce this problem,
generate_bigdata.c.


$ gcc generate_bigdata.c  
$ ./a.out 
  (This step will generate the testcase, BigData.c.)
$ time /gcc-4.7.2/bin/gcc -m32 BigData.c -c -o BigData.o
1.504u 0.077s 0:01.61 97.5%     0+0k 320+10024io 0pf+0w
$ time /gcc-4.7.2/bin/gcc -m32 -O1 BigData.c -c -o BigData.o
50.438u 0.191s 0:50.67 99.9%    0+0k 256+10024io 0pf+0w
$ time /gcc-4.7.2/bin/gcc -m32 -O4 BigData.c -c -o BigData.o
111.710u 3.977s 1:55.73 99.9%   0+0k 1024+9384io 0pf+0w

We tried with gcc44, the optimization takes long also but not as bad as 472.

Sure, code refactoring is best solution and disabling optimization for
particular file is good enough, but will be good idea to improve GCC too.


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

end of thread, other threads:[~2021-12-26  6:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-10 21:28 [Bug c/54896] New: Some optimization slowness with GCC 4.7.2 tammy at Cadence dot COM
2012-10-10 22:04 ` [Bug c/54896] " steven at gcc dot gnu.org
2012-10-10 22:09 ` tammy at Cadence dot COM
2012-10-10 22:51 ` [Bug c/54896] [4.7/4.8 Regression] " steven at gcc dot gnu.org
2012-10-11 14:08 ` rguenth at gcc dot gnu.org
2012-11-25 15:55 ` rguenth at gcc dot gnu.org
2012-12-03 15:50 ` [Bug middle-end/54896] " rguenth at gcc dot gnu.org
2012-12-03 15:51 ` rguenth at gcc dot gnu.org
2013-03-06 11:04 ` [Bug middle-end/54896] optimization slowness on large basic blocks steven at gcc dot gnu.org
2013-03-06 11:12 ` rguenther at suse dot de
2013-03-12 18:24 ` steven at gcc dot gnu.org
2013-03-13  9:53 ` rguenth at gcc dot gnu.org
2021-12-26  6:38 ` 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).