Commit c9c15e27 by Martin Liska Committed by Martin Liska

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
parent 3b387bff
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.
2017-06-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/81003
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment