public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dcb314 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/59802] New: excessive compile time in loop unswitching
Date: Tue, 14 Jan 2014 08:49:00 -0000	[thread overview]
Message-ID: <bug-59802-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 59802
           Summary: excessive compile time in loop unswitching
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com

Created attachment 31830
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31830&action=edit
gzipped C++ source code

I just compiled the attached code with gcc trunk 20140112 on a x86_64
box with flag -O3 and it took over eight minutes.  Using only -O2 took
a more reasonable 2 minutes 38 seconds.

For reference, the redhat version of gcc 482 took 2 minutes 32 seconds
for -O3 and 2 minutes 11 seconds for -O2.

I can see that for -O2, trunk is using about 30 seconds more CPU time,
which is fine, but for -O3 over 5 minutes more.

I tried flag -ftime-report and here are all the times > 1%.

Execution times (seconds)
 phase opt and generate  : 465.18 (100%) usr   0.50 (57%) sys 468.04 (100%)
wall  130935 kB (59%) ggc
 loop invariant motion   :  22.50 ( 5%) usr   0.01 ( 1%) sys  22.85 ( 5%) wall 
     2 kB ( 0%) ggc
 loop unswitching        : 302.37 (65%) usr   0.01 ( 1%) sys 303.82 (65%) wall 
    72 kB ( 0%) ggc
 CPROP                   :  85.02 (18%) usr   0.09 (10%) sys  85.52 (18%) wall 
  4445 kB ( 2%) ggc
 TOTAL                 : 466.12             0.88           469.55            
221219 kB

Suggest code rework for trunk for -O3, maybe in the area of loop unswitching.

This bug may be a duplicate of bug 38518


             reply	other threads:[~2014-01-14  8:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14  8:49 dcb314 at hotmail dot com [this message]
2014-01-14 11:20 ` [Bug rtl-optimization/59802] excessive compile time in RTL optimizers (loop unswitching, CPROP) rguenth at gcc dot gnu.org
2014-01-14 11:21 ` rguenth at gcc dot gnu.org
2014-01-14 12:04 ` dcb314 at hotmail dot com
2014-01-14 13:24 ` rguenth at gcc dot gnu.org
2014-01-14 13:54 ` rguenth at gcc dot gnu.org
2014-01-15 12:17 ` rguenth at gcc dot gnu.org
2014-01-19 21:28 ` dcb314 at hotmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-59802-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).