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 middle-end/40979] induct benchmark 60% slower when compiled with -fgraphite-identity Date: Tue, 01 Feb 2011 17:18:00 -0000 [thread overview] Message-ID: <bug-40979-4-EX0WDjOtUi@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-40979-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40979 --- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-01 17:04:38 UTC --- (In reply to comment #15) > The vectorizer does not apply because it does not match the canonical > form of a reduction: here is the reduction after graphite-identity: > > # l12__lsm.18_179 = PHI <l12__lsm.18_183(5), l12__lsm.18_154(7)> > S1: l12_lower_188 = l12__lsm.18_179; > l12_lower_184 = D.1589_34 + l12_lower_188; > S2: l12__lsm.18_154 = l12_lower_184; > > Without S1 and S2, this would be recognized as a reduction by the > vectorizer. > > Why we end up with the two extra copies? > Here is the original code: > > # l12_lower_5 = PHI <l12_lower_4(4), l12_lower_36(6)> > l12_lower_36 = D.1589_321 + l12_lower_5; > > Graphite does the following: > > l12_lower_5 = *l12_43(D); > l12_lower_36 = D.1589_321 + l12_lower_5; > *l12_43(D) = l12_lower_36; > > Note that at this point we cannot construct this code because we use > data references and we are in Gimple form: > > *l12_43(D) = D.1589_321 + *l12_43(D); > > So I think that the code produced by Graphite is fine, and the problem > is in the cleanups that we're doing after: for instance loop invariant > motion could be improved to avoid the extra two statements S1 and S2: > > # l12__lsm.18_179 = PHI <l12__lsm.18_183(5), l12__lsm.18_154(7)> > S1: l12_lower_188 = l12__lsm.18_179; > l12_lower_184 = D.1589_34 + l12_lower_188; > S2: l12__lsm.18_154 = l12_lower_184; Well, LIM needs a copyprop to cleanup after it - but the cleanups after graphite are in a strange order. LIM is also not really the pass that is supposed to do scalarization of the memory temporary. > I also have tried to run pass_rename_ssa_copies but that would just > rename the base variable l12__lsm.18 into l12_lower and wait for the > out-of-SSA to remove the extra copies. Constant propagation does not > help either... any other suggestions? I'd suggest NEXT_PASS (pass_graphite); { struct opt_pass **p = &pass_graphite.pass.sub; NEXT_PASS (pass_graphite_transforms); NEXT_PASS (pass_lim); NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_dce_loop); }
next prev parent reply other threads:[~2011-02-01 17:18 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-40979-4@http.gcc.gnu.org/bugzilla/> 2011-01-26 10:45 ` dominiq at lps dot ens.fr 2011-01-26 14:43 ` howarth at nitro dot med.uc.edu 2011-01-31 18:53 ` spop at gcc dot gnu.org 2011-01-31 19:36 ` dominiq at lps dot ens.fr 2011-02-01 11:35 ` rguenth at gcc dot gnu.org 2011-02-01 11:45 ` rguenth at gcc dot gnu.org 2011-02-01 16:47 ` spop at gcc dot gnu.org 2011-02-01 17:18 ` rguenth at gcc dot gnu.org [this message] 2011-02-01 17:23 ` sebpop at gmail dot com 2011-02-01 17:51 ` sebpop at gmail dot com 2011-02-01 18:22 ` dominiq at lps dot ens.fr 2011-02-01 21:19 ` howarth at nitro dot med.uc.edu 2011-02-01 21:22 ` spop at gcc dot gnu.org 2011-02-02 15:53 ` spop at gcc dot gnu.org 2011-02-02 15:59 ` spop at gcc dot gnu.org 2009-08-06 0:19 [Bug middle-end/40979] New: " howarth at nitro dot med dot uc dot edu 2009-08-06 0:23 ` [Bug middle-end/40979] " spop at gcc dot gnu dot org 2009-08-12 14:58 ` spop at gcc dot gnu dot org 2009-08-13 2:26 ` howarth at nitro dot med dot uc dot edu 2009-08-14 11:59 ` dominiq at lps dot ens dot fr 2009-12-14 19:24 ` spop at gcc dot gnu dot org 2010-02-25 15:23 ` dominiq at lps dot ens dot fr 2010-02-25 17:26 ` dominiq at lps dot ens dot fr 2010-03-10 1:57 ` howarth at nitro dot med dot uc dot edu 2010-03-15 14:21 ` dominiq at lps dot ens dot 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-40979-4-EX0WDjOtUi@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).