diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2005-03-04 03:14:42 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-03-04 03:14:42 +0000 |
commit | c7d1b4498649c78fd1b0746371dcd29e1645f7af (patch) | |
tree | 24ab184f1b7a44239d7c4f5beb0242e97089fd03 /gcc/gcse.c | |
parent | 3c0d102013cd6e7c5414efe07623ae014e476f8a (diff) | |
download | gcc-c7d1b4498649c78fd1b0746371dcd29e1645f7af.zip gcc-c7d1b4498649c78fd1b0746371dcd29e1645f7af.tar.gz gcc-c7d1b4498649c78fd1b0746371dcd29e1645f7af.tar.bz2 |
* gcse.c (bypass_block): Use find_edge wherever possible.
From-SVN: r95873
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 26 |
1 files changed, 6 insertions, 20 deletions
@@ -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 |