aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-prof.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/value-prof.c')
-rw-r--r--gcc/value-prof.c9
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;