From b89175b1a740b5550c88e6360af85d8170e2a616 Mon Sep 17 00:00:00 2001 From: rguenth Date: Wed, 23 Sep 2009 15:29:22 +0000 Subject: 2009-09-23 Richard Guenther * value-prof.c (gimple_ic): Purge old EH edges only after building the new ones. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152082 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/value-prof.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/value-prof.c') diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 12f1ecc5962..1da60e1a02a 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -1154,8 +1154,6 @@ gimple_ic (gimple icall_stmt, struct cgraph_node *direct_call, lp_nr = lookup_stmt_eh_lp (icall_stmt); if (lp_nr != 0) { - gimple_purge_dead_eh_edges (join_bb); - if (stmt_could_throw_p (dcall_stmt)) { add_stmt_to_eh_lp (dcall_stmt, lp_nr); @@ -1164,6 +1162,9 @@ gimple_ic (gimple icall_stmt, struct cgraph_node *direct_call, gcc_assert (stmt_could_throw_p (icall_stmt)); make_eh_edges (icall_stmt); + + /* The old EH edges are sill on the join BB, purge them. */ + gimple_purge_dead_eh_edges (join_bb); } return dcall_stmt; -- cgit v1.2.1