This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix tramp3d FDO compile
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 23 Sep 2009 17:26:37 +0200 (CEST)
- Subject: [PATCH] Fix tramp3d FDO compile
tramp3d FDO compile fails since some time because we happen to
kill off the basic-block with the EH landing pad before we
build up new EH edges from the new calls produced by indirect call
profiling transformation.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
Richard.
2009-09-23 Richard Guenther <rguenther@suse.de>
* value-prof.c (gimple_ic): Purge old EH edges only after building
the new ones.
Index: gcc/value-prof.c
===================================================================
*** gcc/value-prof.c (revision 152059)
--- gcc/value-prof.c (working copy)
*************** gimple_ic (gimple icall_stmt, struct cgr
*** 1154,1161 ****
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);
--- 1154,1159 ----
*************** gimple_ic (gimple icall_stmt, struct cgr
*** 1164,1169 ****
--- 1162,1170 ----
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;