value-prof.c (gimple_ic): Purge old EH edges only after building the new ones.

2009-09-23  Richard Guenther  <rguenther@suse.de>

	* value-prof.c (gimple_ic): Purge old EH edges only after building
	the new ones.

From-SVN: r152082
This commit is contained in:
Richard Guenther 2009-09-23 15:29:22 +00:00 committed by Richard Biener
parent e02222d2e7
commit 659ad88e5f
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-09-23 Richard Guenther <rguenther@suse.de>
* value-prof.c (gimple_ic): Purge old EH edges only after building
the new ones.
2009-09-23 Nick Clifton <nickc@redhat.com>
* config/arc/arc.c (arc_trampoline_init): Fix typo.

View File

@ -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;