Make early return predictor more precise.
authorMartin Liska <mliska@suse.cz>
Wed, 21 Jun 2017 12:51:46 +0000 (14:51 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 21 Jun 2017 12:51:46 +0000 (12:51 +0000)
commite59a1c22fb249388e82b4fd004f33615abe36d2e
tree0ba9b3f978dc6746d354dccdfb340b58bb47cbfb
parentff9baa5f1c532a43d7d14a800f5a4a5c5757dca6
Make early return predictor more precise.

2017-06-21  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79489
* gimplify.c (maybe_add_early_return_predict_stmt): New
function.
(gimplify_return_expr): Call the function.
* predict.c (tree_estimate_probability_bb): Remove handling
of early return.
* predict.def: Update comment about early return predictor.
* gimple-predict.h (is_gimple_predict): New function.
* predict.def: Change default value of early return to 66.
* tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
statements.
* passes.def: Put pass_strip_predict_hints to the beginning of
IPA passes.

From-SVN: r249450
gcc/ChangeLog
gcc/gimple-low.c
gcc/gimple-predict.h
gcc/gimplify.c
gcc/passes.def
gcc/predict.c
gcc/predict.def
gcc/tree-tailcall.c