summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-23 15:29:22 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-23 15:29:22 +0000
commitb89175b1a740b5550c88e6360af85d8170e2a616 (patch)
tree9fba9963d64ca4398cb3040ddc82c9b3443a721f /gcc
parentfc25a8279fc4b231ee267d3c8539bc170ef99b2c (diff)
downloadgcc-b89175b1a740b5550c88e6360af85d8170e2a616.tar.gz
2009-09-23 Richard Guenther <rguenther@suse.de>
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/value-prof.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cb90da6b46b..634c4cca9f7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
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;