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/38474] compile time explosion in dataflow_set_preserve_mem_locs at -O3
Date: Thu, 07 Mar 2013 14:55:00 -0000	[thread overview]
Message-ID: <bug-38474-4-Gu94Qi9ubd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-38474-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38474

--- Comment #74 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-07 14:55:27 UTC ---
(In reply to comment #73)
> On trunk with the reduced testcase I now see PTA taking 90% of compile-time ...
> 
> Argh.

I can speed it up by

@@ -1631,7 +1619,20 @@ do_sd_constraint (constraint_graph_t gra
            flag |= bitmap_set_bit (sol, escaped_id);
          else if (v->may_have_pointers
                   && add_graph_edge (graph, lhs, t))
-           flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
+           {
+             /* For transitive closures, x = *(x + UNKNOWN), delay
+                propagation of the solution across the added edges
+                by marking sources as changed.  */
+             if (lhs == c->rhs.var)
+               {
+                 bitmap_set_bit (changed, t);
+                 flag |= true;
+               }
+             /* Else speedup solving by doing that here to save
+                iterations.  */
+             else
+               flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
+           }

          /* If the variable is not exactly at the requested offset
             we have to include the next one.  */

as repeatedly walking all of 'sol' for 'sol = *(sol + UNKNOWN)' when
adding the solution of one of delta(sol)'s member is slow.  Using
a temporary bitmap to collect all changes doesn't speed it up though,
so the only effect of the above is that the forwarding is delayed until
the next solver iteration (where eventually we discover and eliminate
more indirect cycles).


  parent reply	other threads:[~2013-03-07 14:55 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-38474-4@http.gcc.gnu.org/bugzilla/>
2011-04-28 16:04 ` [Bug middle-end/38474] slow compilation at -O0 due to expand's temp slot goo rguenth at gcc dot gnu.org
2011-12-02 13:06 ` steven at gcc dot gnu.org
2011-12-02 13:25 ` matz at gcc dot gnu.org
2012-05-27 23:24 ` steven at gcc dot gnu.org
2012-05-29  7:53 ` Joost.VandeVondele at mat dot ethz.ch
2012-05-29 13:09 ` matz at gcc dot gnu.org
2012-05-29 13:12 ` matz at gcc dot gnu.org
2012-05-29 15:08 ` hubicka at gcc dot gnu.org
2012-05-29 16:00 ` jamborm at gcc dot gnu.org
2012-06-15 14:56 ` matz at gcc dot gnu.org
2012-06-15 15:13 ` matz at gcc dot gnu.org
2012-06-15 15:26 ` Joost.VandeVondele at mat dot ethz.ch
2012-06-26 14:26 ` jamborm at gcc dot gnu.org
2012-06-26 14:45 ` matz at gcc dot gnu.org
2012-06-26 14:58 ` rguenth at gcc dot gnu.org
2012-06-26 15:01 ` jamborm at gcc dot gnu.org
2012-06-29 14:34 ` jamborm at gcc dot gnu.org
2012-07-02 15:28 ` jamborm at gcc dot gnu.org
2012-07-02 15:44 ` jamborm at gcc dot gnu.org
2012-07-02 15:53 ` jamborm at gcc dot gnu.org
2012-08-28  8:25 ` steven at gcc dot gnu.org
2012-08-28 11:28 ` Joost.VandeVondele at mat dot ethz.ch
2012-08-28 14:55 ` Joost.VandeVondele at mat dot ethz.ch
2012-08-28 15:07 ` steven at gcc dot gnu.org
2013-03-06 11:01 ` [Bug middle-end/38474] compile time explosion in dataflow_set_preserve_mem_locs at -O3 steven at gcc dot gnu.org
2013-03-07 10:32 ` rguenth at gcc dot gnu.org
2013-03-07 14:55 ` rguenth at gcc dot gnu.org [this message]
2013-12-06 13:43 ` rguenth at gcc dot gnu.org
2013-12-06 14:20 ` rguenth at gcc dot gnu.org
2013-12-09 15:13 ` rguenth at gcc dot gnu.org
2013-12-10 12:31 ` rguenth at gcc dot gnu.org
2021-02-10 14:52 ` rguenth at gcc dot gnu.org
2021-02-10 15:03 ` rguenth at gcc dot gnu.org
2021-02-10 15:46 ` rguenth at gcc dot gnu.org
2021-02-10 15:47 ` rguenth at gcc dot gnu.org
2021-02-10 15:51 ` jakub at gcc dot gnu.org
2021-02-10 15:55 ` rguenther at suse dot de
2021-02-10 16:02 ` rguenth at gcc dot gnu.org
2021-02-10 16:06 ` jakub at gcc dot gnu.org
2021-02-10 16:06 ` rguenth at gcc dot gnu.org
2021-02-10 16:28 ` rguenth at gcc dot gnu.org
2021-02-10 16:49 ` jakub at gcc dot gnu.org
2021-02-11  9:32 ` rguenth at gcc dot gnu.org
2021-02-12  8:57 ` cvs-commit at gcc dot gnu.org
2021-02-12 10:29 ` rguenth at gcc dot gnu.org
2021-02-12 10:35 ` rguenth at gcc dot gnu.org
2021-02-12 11:42 ` cvs-commit at gcc dot gnu.org
2021-02-12 14:40 ` rguenth at gcc dot gnu.org
2021-02-16 12:38 ` cvs-commit at gcc dot gnu.org
2021-04-29  8:04 ` cvs-commit 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-38474-4-Gu94Qi9ubd@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).