diff options
author | Martin Liska <mliska@suse.cz> | 2017-06-12 13:56:32 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-06-12 11:56:32 +0000 |
commit | c9c15e27492888cb0491b72af28ece83f79e4d72 (patch) | |
tree | acc064160ca516cf803efcabed746165f3c08de3 /gcc/tree-profile.c | |
parent | 3b387bff56ed5ca2df4f271540ea9839ba84e57e (diff) | |
download | gcc-c9c15e27492888cb0491b72af28ece83f79e4d72.zip gcc-c9c15e27492888cb0491b72af28ece83f79e4d72.tar.gz gcc-c9c15e27492888cb0491b72af28ece83f79e4d72.tar.bz2 |
Create an extra BB in profile-generate (PR tree-optimization/81041).
2017-06-12 Martin Liska <mliska@suse.cz>
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
Diffstat (limited to 'gcc/tree-profile.c')
-rw-r--r-- | gcc/tree-profile.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index f5c0668..2ae4b69 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; |