From bd98a41841b4c2f94efb5ba21092c33939611646 Mon Sep 17 00:00:00 2001 From: law Date: Tue, 9 Nov 2004 04:21:49 +0000 Subject: * cfg.c (redirect_edge_succ_nodup): Use find_edge rather than implementing it inline. * cfganal.c (find_edge): Search pred->succs or succ->preds, whichever is shorter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90333 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cfg.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gcc/cfg.c') diff --git a/gcc/cfg.c b/gcc/cfg.c index 1901a59051c..b3da1429b1d 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -428,14 +428,9 @@ edge redirect_edge_succ_nodup (edge e, basic_block new_succ) { edge s; - edge_iterator ei; - - /* Check whether the edge is already present. */ - FOR_EACH_EDGE (s, ei, e->src->succs) - if (s->dest == new_succ && s != e) - break; - if (s) + s = find_edge (e->src, new_succ); + if (s && s != e) { s->flags |= e->flags; s->probability += e->probability; -- cgit v1.2.3