public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66263] [4.9/5/6 Regression] Performance regression from gcc-4.8 and up (trivial sudoku program)
Date: Tue, 30 Jun 2015 11:02:00 -0000	[thread overview]
Message-ID: <bug-66263-4-KnPnTVeLGm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66263-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.7.4
         Resolution|---                         |DUPLICATE
      Known to fail|                            |4.8.3, 5.1.0

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed, for me:

4.7.4: 0.77s
4.8.3: 1.5s
5.1: 1.57s

with -O3, time with -O2 didn't regress.  Even with -fno-inline it regresses:

4.7.4 -O3 -fno-inline: 1.7s
5.1 -O3 -fno-inline: 2.3s

Ok, 4.7 unrolls the 

      for (digit = 1; digit <= N; ++digit) {
         if (can_put_digit(row, col, box, digit)) {
            put_digit(row, col, box, digit);
            solve(square+1);
            pop_digit(row, col, box, digit);
         }
      }

loop, so this looks like a duplicate of PR59967.  It also re-orders
basic-blocks in a way that if can_put_digit returns false (which should
be likely in the end) then it just falls thru to the next can_put_digit call.

With inlining the non-pure call is the recursion to solve ().

*** This bug has been marked as a duplicate of bug 59967 ***


      parent reply	other threads:[~2015-06-30 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-23 17:46 [Bug c/66263] New: " bdeyal at gmail dot com
2015-05-23 17:48 ` [Bug c/66263] " bdeyal at gmail dot com
2015-05-26 10:53 ` [Bug tree-optimization/66263] [4.8/4.9/5/6 Regression] " rguenth at gcc dot gnu.org
2015-05-27 22:15 ` bdeyal at gmail dot com
2015-06-23  8:27 ` rguenth at gcc dot gnu.org
2015-06-26 20:18 ` [Bug tree-optimization/66263] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:39 ` jakub at gcc dot gnu.org
2015-06-30 11:02 ` rguenth at gcc dot gnu.org [this message]

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-66263-4-KnPnTVeLGm@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).