aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.def
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-01-19 13:05:20 +0100
committerMartin Liska <marxin@gcc.gnu.org>2018-01-19 12:05:20 +0000
commite2a1e6a441f9ced9412609cd4d8ae8ede52628a3 (patch)
tree4b5b32f73bb7f7d32c6c5d3c9876f543a772cdf4 /gcc/predict.def
parentd1b9a5724b8a05d2d2d51b3e5d13cc785326c74f (diff)
downloadgcc-e2a1e6a441f9ced9412609cd4d8ae8ede52628a3.zip
gcc-e2a1e6a441f9ced9412609cd4d8ae8ede52628a3.tar.gz
gcc-e2a1e6a441f9ced9412609cd4d8ae8ede52628a3.tar.bz2
Introduce PROB_UNINITIALIZED constant and use it in predict.def.
2018-01-19 Martin Liska <mliska@suse.cz> * predict.c (predict_insn_def): Add new assert. (struct branch_predictor): Change type to signed integer. (test_prediction_value_range): Amend test to cover PROB_UNINITIALIZED. * predict.def (PRED_LOOP_ITERATIONS): Use the new constant. (PRED_LOOP_ITERATIONS_GUESSED): Likewise. (PRED_LOOP_ITERATIONS_MAX): Likewise. (PRED_LOOP_IV_COMPARE): Likewise. * predict.h (PROB_UNINITIALIZED): Define new constant. From-SVN: r256887
Diffstat (limited to 'gcc/predict.def')
-rw-r--r--gcc/predict.def8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/predict.def b/gcc/predict.def
index 0f37e39..390b9a3 100644
--- a/gcc/predict.def
+++ b/gcc/predict.def
@@ -54,7 +54,7 @@ DEF_PREDICTOR (PRED_UNCONDITIONAL, "unconditional jump", PROB_ALWAYS,
/* Use number of loop iterations determined by # of iterations
analysis to set probability. We don't want to use Dempster-Shaffer
theory here, as the predictions is exact. */
-DEF_PREDICTOR (PRED_LOOP_ITERATIONS, "loop iterations", PROB_ALWAYS,
+DEF_PREDICTOR (PRED_LOOP_ITERATIONS, "loop iterations", PROB_UNINITIALIZED,
PRED_FLAG_FIRST_MATCH)
/* Assume that any given atomic operation has low contention,
@@ -71,11 +71,11 @@ DEF_PREDICTOR (PRED_BUILTIN_EXPECT, "__builtin_expect", PROB_VERY_LIKELY,
/* Use number of loop iterations guessed by the contents of the loop. */
DEF_PREDICTOR (PRED_LOOP_ITERATIONS_GUESSED, "guessed loop iterations",
- PROB_ALWAYS, PRED_FLAG_FIRST_MATCH)
+ PROB_UNINITIALIZED, 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)
+ PROB_UNINITIALIZED, PRED_FLAG_FIRST_MATCH)
/* Branch containing goto is probably not taken. */
DEF_PREDICTOR (PRED_CONTINUE, "continue", HITRATE (67), 0)
@@ -151,7 +151,7 @@ DEF_PREDICTOR (PRED_LOOP_IV_COMPARE_GUESS, "guess loop iv compare",
/* Use number of loop iterations determined by # of iterations analysis
to set probability of branches that compares IV to loop bound variable. */
-DEF_PREDICTOR (PRED_LOOP_IV_COMPARE, "loop iv compare", PROB_VERY_LIKELY,
+DEF_PREDICTOR (PRED_LOOP_IV_COMPARE, "loop iv compare", PROB_UNINITIALIZED,
PRED_FLAG_FIRST_MATCH)
/* In the following code