public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Nathanael Nerode <neroden@twcny.rr.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c/7344: performance regression on huge case statements Date: Thu, 10 Oct 2002 19:16:00 -0000 [thread overview] Message-ID: <20021011021603.27249.qmail@sources.redhat.com> (raw) The following reply was made to PR c/7344; it has been noted by GNATS. From: Nathanael Nerode <neroden@twcny.rr.com> To: Daniel Berlin <dberlin@dberlin.org> Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, rschiele@uni-mannhiem.de, jh <jh@suse.cz> Subject: Re: c/7344: performance regression on huge case statements Date: Thu, 10 Oct 2002 22:13:02 -0400 Daniel Berlin wrote: > > > On Thu, 10 Oct 2002, Nathanael Nerode wrote: > >> Partial analysis: >> >> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- >> trail&database=gcc&pr=7344 >> >> It's stuck in a loop in et-forest.c at line 420, >> in caclulate_value(node) -- this loop is taking a very, very, long >> time, >> which indicates that that the tree being looked at is very deep. Oh, >> and node->parent->right is equal to node->parent every time. > > >> >> This is called from et_forest_common_ancestor as the condition (!!) >> on a >> while >> statement, making it doubly nested. (Horrible... horrible...) >> >> This is all, eventunally, called from note_prediction_to_br_prob in >> predict.c. > > > Through nearest_common_dominator, which is called by > dominated_by_p, perchance? > If so, this is a known problem. > It doesn't cache the info (I think Jan said he could make it constant > time > in the alternative, which would also solve the problem), so it is > constantly recomputing a value that hasn't changed. (...and one which is expensive to compute using the current algorithm) Yep, that's the one. Thanks for identifying this. > Try replacing dominance.c with the one from the tree-ssa-branch, and see > if that helps. Haven't tried that yet (busy working on something else). Well, so much for one high-priority bug. Shouldn't be hard for Jan to fix then should it? ;-) --Nathanael
next reply other threads:[~2002-10-11 2:16 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-10-10 19:16 Nathanael Nerode [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-04-08 13:15 hubicka 2003-01-08 2:00 bangerth 2002-10-18 6:56 Robert Schiele 2002-10-18 6:16 Nathanael Nerode 2002-10-17 6:46 Robert Schiele 2002-10-17 6:36 Jan Hubicka 2002-10-17 6:36 Nathanael Nerode 2002-10-17 6:26 Michael Matz 2002-10-17 6:06 Nathanael Nerode 2002-10-15 12:16 Jan Hubicka 2002-10-15 11:56 Kaveh R. Ghazi 2002-10-11 13:26 Richard Henderson 2002-10-11 12:56 Jan Hubicka 2002-10-11 10:26 Richard Henderson 2002-10-11 8:06 Jan Hubicka 2002-10-11 7:26 Jan Hubicka 2002-10-11 2:26 Jan Hubicka 2002-10-10 19:56 Nathanael Nerode 2002-10-10 19:26 Daniel Berlin 2002-10-10 19:16 Daniel Berlin 2002-10-10 19:16 Daniel Berlin 2002-10-10 19:06 Nathanael Nerode 2002-10-10 19:06 Nathanael Nerode 2002-10-10 18:56 Nathanael Nerode 2002-07-17 13:16 Gerald Pfeifer 2002-07-17 10:46 rschiele
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=20021011021603.27249.qmail@sources.redhat.com \ --to=neroden@twcny.rr.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).