flow.c (try_forward_edges): Accept fallthru edge; Update comment.
authorJan Hubicka <jh@suse.cz>
Tue, 24 Jul 2001 22:34:43 +0000 (00:34 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 24 Jul 2001 22:34:43 +0000 (22:34 +0000)
* flow.c (try_forward_edges): Accept fallthru edge; Update comment.
(try_crossjump_to_edge): Update commetns.
(try_crossjump_bb): Likewise.

From-SVN: r44318

gcc/ChangeLog
gcc/flow.c

index 03e3de4ca9b1d02ae69262846afa945ed403e48c..30db51bd0d3c8af536283127e3a1cb4f7e051404 100644 (file)
@@ -1,3 +1,9 @@
+Wed Jul 25 00:32:49 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * flow.c (try_forward_edges): Accept fallthru edge; Update comment.
+       (try_crossjump_to_edge): Update commetns.
+       (try_crossjump_bb): Likewise.
+
 2001-07-24  Richard Henderson  <rth@redhat.com>
 
        * combine.c (distribute_notes): Move set of need_refresh
index 5850daf191f9df99f4168b9b1c7c63eee12c4b29..ac1ea5ccee3125600e16ada452b92b36fa92d23e 100644 (file)
@@ -3106,8 +3106,11 @@ try_forward_edges (b)
       next = e->succ_next;
 
       /* Skip complex edges because we don't know how to update them.
-        Skip fallthru edges because there's no jump to update.  */
-      if (e->flags & (EDGE_COMPLEX | EDGE_FALLTHRU))
+        
+         Still handle fallthru edges, as we can suceed to forward fallthru
+         edge to the same place as the branch edge of conditional branch
+         and turn conditional branch to an unconditonal branch.  */
+      if (e->flags & EDGE_COMPLEX)
        continue;
 
       target = first = e->dest;
@@ -3517,14 +3520,14 @@ try_crossjump_to_edge (mode, e1, e2)
       && forwarder_block_p (e2->dest->succ->dest))
     return false;
 
-  /* Likewise with dead code.  */
-  /* ??? Won't we have eliminated these by now?  */
+  /* Likewise with dead code (possibly newly created by the other optimizations
+     of cfg_cleanup).  */
   if (!src1->pred || !src2->pred)
     return false;
 
-  /* Likewise with non-jump edges.  */
-  /* ??? Non-jump?  You mean GET_CODE (e1->src-end) != JUMP_INSN?
-     This fails for computed-goto as well, which may in fact be joinable.  */
+  /* Likewise with complex edges.
+     ??? We should be able to handle most complex edges later with some
+     care.  */
   if (e1->flags & EDGE_COMPLEX)
     return false;
 
@@ -3724,7 +3727,6 @@ try_crossjump_bb (mode, bb)
             checks of crossjump(A,B).  In order to prevent redundant
             checks of crossjump(B,A), require that A be the block 
             with the lowest index.  */
-         /* ??? Perhaps better is lowest execution frequency.  */
          if (e->src->index > e2->src->index)
            continue;