]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* predict.def: Update hitrates.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Aug 2001 11:24:17 +0000 (11:24 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Aug 2001 11:24:17 +0000 (11:24 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44920 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/predict.c

index 2242f7d8ab208ac8ce2e8fb122e64a750e86aff8..5f0784020aef981de98c8100b1b82c5d6abb818a 100644 (file)
@@ -1,3 +1,7 @@
+Wed Aug 15 12:41:32 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * predict.def: Update hitrates.
+
 2001-08-15  Richard Henderson  <rth@redhat.com>
 
        * except.c (TYPE_HASH): Cast to size_t, not HOST_WIDE_INT.
index ade8121afbde74ea20922b114c9850fa528ed6d5..63819e3276b4dbbc8744861975a72f0c0388b5c7 100644 (file)
@@ -608,10 +608,6 @@ typedef struct block_info_def
 
   /* True if block already converted.  */
   int visited:1;
-
-  /* Number of block proceeded before adding basic block to the queue.  Used
-     to recognize irregular regions.  */
-  int nvisited;
 } *block_info;
 
 /* Similar information for edges.  */
@@ -638,7 +634,6 @@ propagate_freq (head)
   basic_block last = bb;
   edge e;
   basic_block nextbb;
-  int nvisited = 0;
 
   BLOCK_INFO (head)->frequency = 1;
   for (; bb; bb = nextbb)
@@ -652,38 +647,25 @@ propagate_freq (head)
       if (bb != head)
        {
          for (e = bb->pred; e; e = e->pred_next)
-           if (!BLOCK_INFO (e->src)->visited && !EDGE_INFO (e)->back_edge)
+           if (!BLOCK_INFO (e->src)->visited && !(e->flags & EDGE_DFS_BACK))
              break;
 
-         /* We haven't proceeded all predecessors of edge e yet.
-            These may be waiting in the queue or we may hit an
-            irreducible region.
-
-            To avoid infinite looping on irrecudible regions, count
-            the number of blocks proceeded at the time the basic
-            block has been queued.  In the case the number doesn't
-            change, we've hit an irreducible region and we can forget
-            the backward edge.  This can increase the time complexity
-            by the number of irreducible blocks, but in the same way
-            the standard the loop does, so it should not result in a
-            noticeable slowdown.
-
-            Alternatively we may distinguish backward and cross edges
-            in the DFS tree by the preprocessing pass and ignore the
-            existence of non-loop backward edges.  */
-         if (e && BLOCK_INFO (bb)->nvisited != nvisited)
+         /* We haven't proceeded all predecessors of edge e yet.  */
+         if (e)
            {
              if (!nextbb)
                nextbb = e->dest;
              else
                BLOCK_INFO (last)->next = e->dest;
-             BLOCK_INFO (last)->nvisited = nvisited;
              last = e->dest;
              continue;
            }
-         else if (e && rtl_dump_file)
-           fprintf (rtl_dump_file, "Irreducible region hit, ignoring edge to bb %i\n",
-                    bb->index);
+         if (rtl_dump_file)
+           for (e = bb->pred; e; e = e->pred_next)
+             if (!BLOCK_INFO (e->src)->visited && !EDGE_INFO (e)->back_edge)
+               fprintf (rtl_dump_file,
+                        "Irreducible region hit, ignoring edge to %i->%i\n",
+                        e->src->index, bb->index);
 
          for (e = bb->pred; e; e = e->pred_next)
            if (EDGE_INFO (e)->back_edge)
@@ -718,10 +700,8 @@ propagate_freq (head)
              nextbb = e->dest;
            else
              BLOCK_INFO (last)->next = e->dest;
-           BLOCK_INFO (last)->nvisited = nvisited;
            last = e->dest;
          }
-      nvisited ++;
     }
 }
 
@@ -801,6 +781,7 @@ estimate_bb_frequencies (loops)
   int i;
   double freq_max = 0;
 
+  mark_dfs_back_edges ();
   if (flag_branch_probabilities)
     {
       counts_to_freqs ();