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 tree-optimization/61515] [4.9/5 Regression] Extremely long compile time for generated code
Date: Wed, 05 Nov 2014 12:35:00 -0000 [thread overview]
Message-ID: <bug-61515-4-l8N7YgJvKX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61515-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61515
--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #23)
> The piece you're missing in this is that when we seen an assignment to some
> SSA_NAME, call it LHS and we've traversed a backedge, then we have to walk
> through all the equivalences and see if there's anything that's been marked
> as equivalent to LHS and invalidate those. Then we also ahve to invalidate
> LHS.
>
> for (unsigned int i = 1; i < num_ssa_names; i++)
> if (ssa_name (i) && SSA_NAME_VALUE (ssa_name (i)) == lhs)
> record_temporary_equivalence (ssa_name (i), NULL_TREE, stack);
>
> if (SSA_NAME_VALUE (lhs))
> record_temporary_equivalence (lhs, NULL_TREE, stack);
>
>
> The loop finds handles things equivalent to LHS, the second handles LHS
> itself. Both are required for correctness.
>
> In the past there was a map similar to your implementation, but it's not
> sufficient. See pr61289.C and pr61289-2.C.
>
> The problem is you may need to invalidate equivalences that are created
> *outside* tree-ssa-threadedge.c. So any attempts to track inside
> tree-ssa-threadedge are not sufficient for correctness.
>
> What's still not clear to me here is *why* we're calling the invalidation
> code in the first place. It's only supposed to be called when we encounter
> a statement which produces an output that we can't handle *and* we've
> traversed a backedge. The combination of those two events is supposed to be
> very rare. Otherwise the invalidation is obviously too expensive. That's
> why I suggested in c#12 that we need to look at *why* we're calling the
> invalidation code at all.
Well, I don't know the code at all so I can just try to fix the complexity
in the present algorithm.
Please have a look here during stage3.
next prev parent reply other threads:[~2014-11-05 12:35 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-15 23:23 [Bug tree-optimization/61515] New: " astrange at ithinksw dot com
2014-06-15 23:24 ` [Bug tree-optimization/61515] " astrange at ithinksw dot com
2014-06-16 2:40 ` pinskia at gcc dot gnu.org
2014-06-16 6:44 ` astrange at ithinksw dot com
2014-06-16 8:28 ` rguenth at gcc dot gnu.org
2014-06-16 9:45 ` rguenth at gcc dot gnu.org
2014-06-16 9:47 ` rguenth at gcc dot gnu.org
2014-06-16 11:19 ` [Bug tree-optimization/61515] [4.10 Regression] " rguenth at gcc dot gnu.org
2014-06-17 11:11 ` rguenth at gcc dot gnu.org
2014-06-17 11:23 ` rguenth at gcc dot gnu.org
2014-06-17 11:48 ` rguenth at gcc dot gnu.org
2014-06-17 12:00 ` [Bug tree-optimization/61515] [4.9/4.10 " rguenth at gcc dot gnu.org
2014-06-17 19:34 ` law at redhat dot com
2014-06-18 7:45 ` rguenther at suse dot de
2014-06-26 12:50 ` rguenth at gcc dot gnu.org
2014-07-16 13:28 ` jakub at gcc dot gnu.org
2014-10-21 9:39 ` [Bug tree-optimization/61515] [4.9/5 " rguenth at gcc dot gnu.org
2014-10-21 9:46 ` rguenth at gcc dot gnu.org
2014-10-21 9:52 ` rguenth at gcc dot gnu.org
2014-10-21 9:55 ` rguenth at gcc dot gnu.org
2014-10-21 10:05 ` rguenth at gcc dot gnu.org
2014-10-21 11:19 ` rguenth at gcc dot gnu.org
2014-10-21 11:59 ` rguenth at gcc dot gnu.org
2014-10-30 10:38 ` jakub at gcc dot gnu.org
2014-11-04 23:03 ` law at redhat dot com
2014-11-05 12:35 ` rguenth at gcc dot gnu.org [this message]
2014-11-06 21:45 ` law at redhat dot com
2014-11-07 8:33 ` rguenth at gcc dot gnu.org
2014-11-07 16:47 ` law at redhat dot com
2014-11-07 22:55 ` law at gcc dot gnu.org
2015-06-26 20:04 ` [Bug tree-optimization/61515] [4.9 " jakub at gcc dot gnu.org
2015-06-26 20:34 ` jakub 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-61515-4-l8N7YgJvKX@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: link
Be 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).