From: Martin Liska Date: Mon, 12 Jun 2017 11:56:32 +0000 (+0200) Subject: Create an extra BB in profile-generate (PR tree-optimization/81041). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9c15e27492888cb0491b72af28ece83f79e4d72;p=gcc.git Create an extra BB in profile-generate (PR tree-optimization/81041). 2017-06-12 Martin Liska PR tree-optimization/81041 * tree-profile.c (gimple_gen_ic_func_profiler): Create an extra BB in profile-generate (gimple_gen_time_profiler): Likewise. From-SVN: r249120 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9dbcf02abf0..0f5444cd5b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-06-12 Martin Liska + + PR tree-optimization/81041 + * tree-profile.c (gimple_gen_ic_func_profiler): + Create an extra BB in profile-generate + (gimple_gen_time_profiler): Likewise. + 2017-06-12 Jakub Jelinek PR tree-optimization/81003 diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index f5c06684402..2ae4b69b68e 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -429,6 +429,10 @@ gimple_gen_ic_func_profiler (void) basic_block cond_bb = split_edge (single_succ_edge (entry)); basic_block update_bb = split_edge (single_succ_edge (cond_bb)); + /* We need to do an extra split in order to not create an input + for a possible PHI node. */ + split_edge (single_succ_edge (update_bb)); + edge true_edge = single_succ_edge (cond_bb); true_edge->flags = EDGE_TRUE_VALUE; @@ -487,6 +491,10 @@ gimple_gen_time_profiler (unsigned tag, unsigned base) basic_block cond_bb = split_edge (single_succ_edge (entry)); basic_block update_bb = split_edge (single_succ_edge (cond_bb)); + /* We need to do an extra split in order to not create an input + for a possible PHI node. */ + split_edge (single_succ_edge (update_bb)); + edge true_edge = single_succ_edge (cond_bb); true_edge->flags = EDGE_TRUE_VALUE; true_edge->probability = PROB_UNLIKELY;