This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/66263] [4.9/5/6 Regression] Performance regression from gcc-4.8 and up (trivial sudoku program)
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Jun 2015 11:02:49 +0000
- Subject: [Bug tree-optimization/66263] [4.9/5/6 Regression] Performance regression from gcc-4.8 and up (trivial sudoku program)
- Auto-submitted: auto-generated
- References: <bug-66263-4 at http dot gcc dot gnu dot 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 ***