aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-07-03 00:11:14 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-07-02 22:11:14 +0000
commitb543d68098e1b74c63db89960f281cb96d3724a5 (patch)
treefb39002b84166011a70ef4fd5414ed4fad723b52 /gcc/tree-complex.c
parentef29f5dd771fcfdd778b304c515bcbc7a27b699e (diff)
downloadgcc-b543d68098e1b74c63db89960f281cb96d3724a5.zip
gcc-b543d68098e1b74c63db89960f281cb96d3724a5.tar.gz
gcc-b543d68098e1b74c63db89960f281cb96d3724a5.tar.bz2
* tree-complex.c (expand_complex_div_wide): update profile.
From-SVN: r249884
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index e0dd3d9..d61047b 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -1186,13 +1186,22 @@ expand_complex_div_wide (gimple_stmt_iterator *gsi, tree inner_type,
bb_join = e->dest;
bb_true = create_empty_bb (bb_cond);
bb_false = create_empty_bb (bb_true);
+ bb_true->frequency = bb_false->frequency = bb_cond->frequency / 2;
+ bb_true->count = bb_false->count
+ = bb_cond->count.apply_probability (profile_probability::even ());
/* Wire the blocks together. */
e->flags = EDGE_TRUE_VALUE;
+ e->count = bb_true->count;
+ /* TODO: With value profile we could add an historgram to determine real
+ branch outcome. */
+ e->probability = profile_probability::even ();
redirect_edge_succ (e, bb_true);
- make_edge (bb_cond, bb_false, EDGE_FALSE_VALUE);
- make_edge (bb_true, bb_join, EDGE_FALLTHRU);
- make_edge (bb_false, bb_join, EDGE_FALLTHRU);
+ edge e2 = make_edge (bb_cond, bb_false, EDGE_FALSE_VALUE);
+ e2->count = bb_false->count;
+ e2->probability = profile_probability::even ();
+ make_single_succ_edge (bb_true, bb_join, EDGE_FALLTHRU);
+ make_single_succ_edge (bb_false, bb_join, EDGE_FALLTHRU);
add_bb_to_loop (bb_true, bb_cond->loop_father);
add_bb_to_loop (bb_false, bb_cond->loop_father);