public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/51497] [4.7 Regression] The run time for the polyhedron test nf.f90 is ~10% slower with -flto after revision 182107 Date: Mon, 12 Dec 2011 13:11:00 -0000 [thread overview] Message-ID: <bug-51497-4-YBFAOD3Qsx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51497-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51497 --- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-12-12 13:09:49 UTC --- > I can't see any vectorizer differences for the testcase in comment #2 and the > patch you cite only (should) have debuginfo changes, no changes to the produced > IL at statement level (eventually it has better type-based alias analysis). > > Not confirmed. I have just done the following check: (1) gfc -Ofast -funroll-loops nf.f90 -ftree-vectorizer-verbose=1 > & tmp1 (2) gfc -Ofast -funroll-loops nf.f90 -ftree-vectorizer-verbose=1 -flto > & tmp2 I noticed that the tmp2 file contains two sets of annotations, likely one for the usual vectorization (up to line 334) and a second one for the lto stage. (3) I have split the file tmp2 in a new tmp2 keeping only the first 334 lines and a second one containing the second part. (4) I have used diff to compare the files: tmp1 and the new tmp2 are identical, while I see missing vectorizations in tmp3: --- tmp1 2011-12-12 13:49:06.000000000 +0100 +++ tmp3 2011-12-12 13:54:12.000000000 +0100 ... -206: LOOP VECTORIZED. -nf.f90:204: note: vectorized 7 loops in function. ... -nf.f90:256: note: vectorized 3 loops in function. +nf.f90:256: note: vectorized 2 loops in function. ... -nf.f90:288: note: vectorized 3 loops in function. +nf.f90:288: note: vectorized 2 loops in function. This confirms what I have seen in the disassembled executable. Questions: (1) do you see the slowdown with -flto? (2) can you reproduce the above? > The two else if blocks are related, not independent, independently reverting > them makes no sense. I am not suggesting to remove one block. I was only interested in finding which part of the patch caused/exposed the problem (which looks like yet another instance of a bad choice of optimization for size: as pointed in 51499, the vectorization generates two loops, one vectorized and one not, hence ~doubling the code size).
next prev parent reply other threads:[~2011-12-12 13:10 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-12-10 13:27 [Bug lto/51497] New: " dominiq at lps dot ens.fr 2011-12-10 18:42 ` [Bug lto/51497] " dominiq at lps dot ens.fr 2011-12-11 14:14 ` dominiq at lps dot ens.fr 2011-12-12 10:40 ` rguenth at gcc dot gnu.org 2011-12-12 13:11 ` dominiq at lps dot ens.fr [this message] 2011-12-12 14:46 ` rguenth at gcc dot gnu.org 2011-12-12 15:19 ` dominiq at lps dot ens.fr 2011-12-14 13:06 ` rguenth at gcc dot gnu.org 2011-12-14 15:33 ` rguenth at gcc dot gnu.org 2011-12-14 15:36 ` rguenth at gcc dot gnu.org 2011-12-14 15:39 ` dominiq at lps dot ens.fr
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-51497-4-YBFAOD3Qsx@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: linkBe 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).