diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-07-01 22:46:40 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-07-01 20:46:40 +0000 |
commit | af2bbc51d3879b6e7a03b4dc2d4ab017a98270ba (patch) | |
tree | 7af6a2ca2adedc6bef10ea8e3c46425031abf858 /gcc/cfgloopanal.c | |
parent | e39df5466d0cde13fd47e612f20ef2b0ac117e2b (diff) | |
download | gcc-af2bbc51d3879b6e7a03b4dc2d4ab017a98270ba.zip gcc-af2bbc51d3879b6e7a03b4dc2d4ab017a98270ba.tar.gz gcc-af2bbc51d3879b6e7a03b4dc2d4ab017a98270ba.tar.bz2 |
cfg.c (scale_bbs_frequencies): New function.
* cfg.c (scale_bbs_frequencies): New function.
* cfg.h (scale_bbs_frequencies): Declare it.
* cfgloopanal.c (single_likely_exit): Cleanup.
* cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
as parameter.
(scale_loop_profile): Likewise.
(loop_version): Likewise.
(create_empty_loop_on_edge): Update.
* cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
scale_loop_frequencies, scale_loop_profile, loopify,
loop_version): Update prototypes.
* modulo-sched.c (sms_schedule): Update.
* predict.c (unlikely_executed_edge_p): Also check probability.
(probably_never_executed_edge_p): Fix typo.
* tree-if-conv.c (version_loop_for_if_conversion): Update.
* tree-parloops.c (gen_parallel_loop): Update.
* tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
* tree-ssa-loop-split.c (split_loop): Update.
* tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
* tree-vect-loop-manip.c (vect_do_peeling): Update.
(vect_loop_versioning): Update.
* tree-vect-loop.c (scale_profile_for_vect_loop): Update.
From-SVN: r249872
Diffstat (limited to 'gcc/cfgloopanal.c')
-rw-r--r-- | gcc/cfgloopanal.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c index 62e1c00..73710ab 100644 --- a/gcc/cfgloopanal.c +++ b/gcc/cfgloopanal.c @@ -469,16 +469,12 @@ single_likely_exit (struct loop *loop) exits = get_loop_exit_edges (loop); FOR_EACH_VEC_ELT (exits, i, ex) { - if (ex->flags & (EDGE_EH | EDGE_ABNORMAL_CALL)) - continue; - /* The constant of 5 is set in a way so noreturn calls are - ruled out by this test. The static branch prediction algorithm - will not assign such a low probability to conditionals for usual - reasons. - FIXME: Turn to likely_never_executed */ - if ((profile_status_for_fn (cfun) != PROFILE_ABSENT - && ex->probability < profile_probability::from_reg_br_prob_base (5)) - || ex->count == profile_count::zero ()) + if (probably_never_executed_edge_p (cfun, ex) + /* We want to rule out paths to noreturns but not low probabilities + resulting from adjustments or combining. + FIXME: once we have better quality tracking, make this more + robust. */ + || ex->probability <= profile_probability::very_unlikely ()) continue; if (!found) found = ex; |