From: Jan Hubicka Date: Tue, 24 Jul 2001 22:34:43 +0000 (+0200) Subject: flow.c (try_forward_edges): Accept fallthru edge; Update comment. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40fc4e6a9ff481ac5f01a89bd924bf30ad305b78;p=gcc.git flow.c (try_forward_edges): Accept fallthru edge; Update comment. * flow.c (try_forward_edges): Accept fallthru edge; Update comment. (try_crossjump_to_edge): Update commetns. (try_crossjump_bb): Likewise. From-SVN: r44318 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 03e3de4ca9b..30db51bd0d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Wed Jul 25 00:32:49 CEST 2001 Jan Hubicka + + * 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 * combine.c (distribute_notes): Move set of need_refresh diff --git a/gcc/flow.c b/gcc/flow.c index 5850daf191f..ac1ea5ccee3 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -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;