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/46590] [4.6/4.7/4.8 Regression] long compile time with -O2 and many loops
Date: Thu, 23 Aug 2012 11:43:00 -0000	[thread overview]
Message-ID: <bug-46590-4-IEPx7cNZiy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46590-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #31 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-23 11:41:50 UTC ---
Btw, I have experimented with

Index: tree-into-ssa.c
===================================================================
--- tree-into-ssa.c     (revision 190594)
+++ tree-into-ssa.c     (working copy)
@@ -3224,11 +3224,35 @@ update_ssa (unsigned update_flags)
       bitmap_head *dfs;

       /* If the caller requested PHI nodes to be added, compute
-        dominance frontiers.  */
+        dominance frontiers for all interesting blocks
+        up to the dominating start_bb.  */
       dfs = XNEWVEC (bitmap_head, last_basic_block);
       FOR_EACH_BB (bb)
        bitmap_initialize (&dfs[bb->index], &bitmap_default_obstack);
-      compute_dominance_frontiers (dfs);
+      EXECUTE_IF_SET_IN_BITMAP (blocks_to_update, 0, i, bi)
+       {
+         basic_block b = BASIC_BLOCK (i);
+         edge_iterator ei;
+         edge p;
+         if (EDGE_COUNT (b->preds) >= 2)
+           FOR_EACH_EDGE (p, ei, b->preds)
+             {
+               basic_block runner = p->src;
+               basic_block domsb;
+               if (runner == start_bb)
+                 continue;
+
+               domsb = get_immediate_dominator (CDI_DOMINATORS, b);
+               while (runner != domsb)
+                 {
+                   if (!bitmap_set_bit (&dfs[runner->index],
+                                        b->index))
+                     break;
+                   runner = get_immediate_dominator (CDI_DOMINATORS,
+                                                     runner);
+                 }
+             }
+       }

       if (sbitmap_first_set_bit (old_ssa_names) >= 0)
        {

which helps reducing the time spent in computing dominance frontiers.  But
as we no longer have bitmaps but bitmap_heads in dfs it's hard to verify
we only ever access dfs for entries we computed ... but we should,
looking at how compute_idf works(?).


  parent reply	other threads:[~2012-08-23 11:43 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21 13:23 [Bug tree-optimization/46590] New: " tkoenig at gcc dot gnu.org
2010-11-21 13:25 ` [Bug tree-optimization/46590] " tkoenig at gcc dot gnu.org
2010-11-21 17:19 ` dominiq at lps dot ens.fr
2010-11-21 18:55 ` tkoenig at gcc dot gnu.org
2010-11-21 19:13 ` rguenth at gcc dot gnu.org
2010-11-21 19:49 ` tkoenig at gcc dot gnu.org
2010-11-21 19:49 ` tkoenig at gcc dot gnu.org
2010-11-21 21:13 ` tkoenig at gcc dot gnu.org
2010-11-21 21:46 ` [Bug tree-optimization/46590] [4.6 Regression] " tkoenig at gcc dot gnu.org
2010-11-21 23:14 ` tkoenig at gcc dot gnu.org
2010-11-22 13:30 ` [Bug tree-optimization/46590] [4.5/4.6 " rguenth at gcc dot gnu.org
2010-11-22 13:30 ` [Bug tree-optimization/46590] [4.6 " rguenth at gcc dot gnu.org
2010-11-22 16:19 ` [Bug tree-optimization/46590] [4.5/4.6 " rguenth at gcc dot gnu.org
2010-11-24 12:40 ` rguenth at gcc dot gnu.org
2010-11-24 14:19 ` rguenth at gcc dot gnu.org
2011-01-03 20:25 ` rguenth at gcc dot gnu.org
2011-03-25 19:55 ` [Bug tree-optimization/46590] [4.5/4.6/4.7 " jakub at gcc dot gnu.org
2011-06-27 16:23 ` jakub at gcc dot gnu.org
2011-10-26 17:37 ` jakub at gcc dot gnu.org
2012-01-05  1:48 ` pinskia at gcc dot gnu.org
2012-01-19 15:20 ` matz at gcc dot gnu.org
2012-01-19 15:26 ` matz at gcc dot gnu.org
2012-01-26 16:23 ` matz at gcc dot gnu.org
2012-03-01 14:45 ` jakub at gcc dot gnu.org
2012-08-21  8:10 ` [Bug tree-optimization/46590] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2012-08-21  9:44 ` steven at gcc dot gnu.org
2012-08-21 10:00 ` rguenther at suse dot de
2012-08-21 14:11 ` rguenth at gcc dot gnu.org
2012-08-21 14:57 ` rguenth at gcc dot gnu.org
2012-08-22 11:43 ` rguenth at gcc dot gnu.org
2012-08-22 13:21 ` rguenth at gcc dot gnu.org
2012-08-22 17:34 ` stevenb.gcc at gmail dot com
2012-08-23  7:14 ` rguenther at suse dot de
2012-08-23 11:43 ` rguenth at gcc dot gnu.org [this message]
2012-08-23 13:46 ` steven at gcc dot gnu.org
2012-09-03 10:46 ` rguenth at gcc dot gnu.org
2012-09-03 15:41 ` matz at gcc dot gnu.org
2012-09-04 13:18 ` rguenth at gcc dot gnu.org
2012-09-05 11:01 ` rguenth at gcc dot gnu.org
2012-09-05 13:30 ` rguenth at gcc dot gnu.org
2012-12-03 15:52 ` [Bug tree-optimization/46590] " rguenth at gcc dot gnu.org
2014-01-16 13:49 ` rguenth at gcc dot gnu.org
2014-01-16 15:51 ` rguenth at gcc dot gnu.org
2014-01-17 11:37 ` rguenth at gcc dot gnu.org
2014-01-17 12:09 ` rguenth at gcc dot gnu.org
2014-01-17 14:49 ` rguenth at gcc dot gnu.org
2014-10-21  9:23 ` rguenth 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-46590-4-IEPx7cNZiy@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).