summaryrefslogtreecommitdiff
path: root/gcc/predict.def
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-05 16:43:19 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2016-06-05 16:43:19 +0000
commitd07b2b6fa2d4cd04f333690897db09baa3c90beb (patch)
treef0969b97cc1c4b6c49e7a43b1e102512bbef6698 /gcc/predict.def
parent2bc8182ce5851debd8b2583fe7432964f5f606f7 (diff)
downloadgcc-d07b2b6fa2d4cd04f333690897db09baa3c90beb.tar.gz
* predict.c (predicted_by_loop_heuristics_p): New function.
(predict_iv_comparison): Use it. (predict_loops): Walk from innermost loops; do not predict edges leaving multiple loops multiple times; implement PRED_LOOP_ITERATIONS_MAX heuristics. * predict.def (PRED_LOOP_ITERATIONS_MAX): New predictor. * gcc.dg/predict-9.c: Update template. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237103 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/predict.def')
-rw-r--r--gcc/predict.def4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/predict.def b/gcc/predict.def
index 67de6f3c6ed..9c7db7ab072 100644
--- a/gcc/predict.def
+++ b/gcc/predict.def
@@ -73,6 +73,10 @@ DEF_PREDICTOR (PRED_BUILTIN_EXPECT, "__builtin_expect", PROB_VERY_LIKELY,
DEF_PREDICTOR (PRED_LOOP_ITERATIONS_GUESSED, "guessed loop iterations",
PROB_ALWAYS, PRED_FLAG_FIRST_MATCH)
+/* Use number of loop iterations guessed by the contents of the loop. */
+DEF_PREDICTOR (PRED_LOOP_ITERATIONS_MAX, "guessed loop iterations",
+ PROB_ALWAYS, PRED_FLAG_FIRST_MATCH)
+
/* Branch containing goto is probably not taken. */
DEF_PREDICTOR (PRED_CONTINUE, "continue", HITRATE (50), 0)