diff options
author | Martin Liska <mliska@suse.cz> | 2017-06-21 14:51:46 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-06-21 12:51:46 +0000 |
commit | e59a1c22fb249388e82b4fd004f33615abe36d2e (patch) | |
tree | 0ba9b3f978dc6746d354dccdfb340b58bb47cbfb /gcc/gimple-predict.h | |
parent | ff9baa5f1c532a43d7d14a800f5a4a5c5757dca6 (diff) | |
download | gcc-e59a1c22fb249388e82b4fd004f33615abe36d2e.zip gcc-e59a1c22fb249388e82b4fd004f33615abe36d2e.tar.gz gcc-e59a1c22fb249388e82b4fd004f33615abe36d2e.tar.bz2 |
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
Diffstat (limited to 'gcc/gimple-predict.h')
-rw-r--r-- | gcc/gimple-predict.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/gimple-predict.h b/gcc/gimple-predict.h index ba58e12..0e6c2e1 100644 --- a/gcc/gimple-predict.h +++ b/gcc/gimple-predict.h @@ -80,4 +80,12 @@ gimple_build_predict (enum br_predictor predictor, enum prediction outcome) return p; } +/* Return true if GS is a GIMPLE_PREDICT statement. */ + +static inline bool +is_gimple_predict (const gimple *gs) +{ + return gimple_code (gs) == GIMPLE_PREDICT; +} + #endif /* GCC_GIMPLE_PREDICT_H */ |