public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown Date: Sun, 04 Jan 2015 16:37:00 -0000 [thread overview] Message-ID: <bug-64425-4-rv4Nu4ajx0@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64425-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425 --- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Yep, I looked into this before comitting the patch. I have tracked it down to inlining of function UniformRectilinearMesh<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::cellPosition(Loc<3> const&) const: inline PointType_t cellPosition(const Loc_t &loc) const { PointType_t point; for (int i=0; i<dimensions; i++) point(i) = origin()(i) + spacings()(i) * (loc[i].first() - physicalCellDomain()[i].first() + 0.5); return point; } this function is somewhat evil: dimensons is a small compile time constant and the loop unrolls completely into quite simple code. This is however not done prior inlining. Inliner thus think that the function is 168 instructions and the speedup for inlining accounts only removing some of this-> references, overall 9%. As an effect of various roundoff errors being eliminated by the sreal code, the functions sinks down in the priority queue quite a bit bellow the inline-unit-growth cutoff. There seems to be no issues with priority calculation, just the functions looks bit uncool for inlining and got lucky in the old model (that was for years tested on tramp3d) The patch I sent for simplification of priority queue solves the failure: https://gcc.gnu.org/ml/gcc-patches/2015-01/msg00004.html The patch seem win in general on benchmarks I tested (it is big win for tramp3d so I can reduce unit growth to 15%) I however would like first the testers to get restarted after vacations and there is one regression I want to analyze first in my testing.
next prev parent reply other threads:[~2015-01-04 16:37 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-12-28 9:30 [Bug ipa/64425] New: " trippels at gcc dot gnu.org 2014-12-28 9:38 ` [Bug ipa/64425] " trippels at gcc dot gnu.org 2014-12-28 19:02 ` hjl.tools at gmail dot com 2015-01-04 16:37 ` hubicka at gcc dot gnu.org [this message] 2015-01-04 16:51 ` trippels at gcc dot gnu.org 2015-01-12 9:28 ` hubicka at gcc dot gnu.org 2015-01-12 10:18 ` trippels at gcc dot gnu.org
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-64425-4-rv4Nu4ajx0@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).