diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/gcse.c | 26 |
2 files changed, 10 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6765aca02c..4faebd4e6d1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2005-03-04 Kazu Hirata <kazu@cs.umass.edu> + + * gcse.c (bypass_block): Use find_edge wherever possible. + 2005-03-03 Daniel Berlin <dberlin@dbrelin.org> Fix PR debug/20253 diff --git a/gcc/gcse.c b/gcc/gcse.c index 456a857259f..d5927d15ee9 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -3581,16 +3581,11 @@ bypass_block (basic_block bb, rtx setcc, rtx jump) } else if (GET_CODE (new) == LABEL_REF) { - edge_iterator ei2; - dest = BLOCK_FOR_INSN (XEXP (new, 0)); /* Don't bypass edges containing instructions. */ - FOR_EACH_EDGE (edest, ei2, bb->succs) - if (edest->dest == dest && edest->insns.r) - { - dest = NULL; - break; - } + edest = find_edge (bb, dest); + if (edest && edest->insns.r) + dest = NULL; } else dest = NULL; @@ -3599,18 +3594,9 @@ bypass_block (basic_block bb, rtx setcc, rtx jump) branch. We would end up emitting the instruction on "both" edges. */ - if (dest && setcc && !CC0_P (SET_DEST (PATTERN (setcc)))) - { - edge e2; - edge_iterator ei2; - - FOR_EACH_EDGE (e2, ei2, e->src->succs) - if (e2->dest == dest) - { - dest = NULL; - break; - } - } + if (dest && setcc && !CC0_P (SET_DEST (PATTERN (setcc))) + && find_edge (e->src, dest)) + dest = NULL; old_dest = e->dest; if (dest != NULL |