diff options
author | Richard Guenther <rguenther@suse.de> | 2010-12-01 13:13:23 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-12-01 13:13:23 +0000 |
commit | ee597801cc32f80c8a959150bbb5d6592c09885b (patch) | |
tree | 44803feb4e00bc3081c8260ed6256fa187ed2823 /gcc/value-prof.c | |
parent | 3b14df1dbd07e302aa5fa5251af9fc08e6e57fac (diff) | |
download | gcc-ee597801cc32f80c8a959150bbb5d6592c09885b.zip gcc-ee597801cc32f80c8a959150bbb5d6592c09885b.tar.gz gcc-ee597801cc32f80c8a959150bbb5d6592c09885b.tar.bz2 |
re PR bootstrap/46730 (Failed to profiledbootstrap)
2010-12-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46730
* value-prof.c (gimple_ic): Always generate a separate merge BB.
* g++.dg/tree-prof/indir-call-prof-2.C: New testcase.
From-SVN: r167326
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r-- | gcc/value-prof.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 9e27a96..6011922 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -1146,10 +1146,15 @@ gimple_ic (gimple icall_stmt, struct cgraph_node *direct_call, icall_bb->count = all - count; /* Do not disturb existing EH edges from the indirect call. */ - if (last_stmt (icall_bb) != icall_stmt) + if (gsi_stmt (gsi_last_bb (icall_bb)) != icall_stmt) e_ij = split_block (icall_bb, icall_stmt); else - e_ij = find_fallthru_edge (icall_bb->succs); + { + e_ij = find_fallthru_edge (icall_bb->succs); + e_ij->probability = REG_BR_PROB_BASE; + e_ij->count = all - count; + e_ij = single_pred_edge (split_edge (e_ij)); + } join_bb = e_ij->dest; join_bb->count = all; |