aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-03-04 03:14:42 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-03-04 03:14:42 +0000
commitc7d1b4498649c78fd1b0746371dcd29e1645f7af (patch)
tree24ab184f1b7a44239d7c4f5beb0242e97089fd03 /gcc/gcse.c
parent3c0d102013cd6e7c5414efe07623ae014e476f8a (diff)
downloadgcc-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.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 456a857..d5927d1 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