diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2016-06-25 18:52:32 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2016-06-25 16:52:32 +0000 |
commit | 7805417a5d2a9a79a3858b82d60169178f59c6f1 (patch) | |
tree | 1b33d23bbcb416fae09c690f99e78c7b06c92985 /gcc/predict.def | |
parent | 888ed1a39a46d55a7c1f2357d31eb4b59e4dc721 (diff) | |
download | gcc-7805417a5d2a9a79a3858b82d60169178f59c6f1.zip gcc-7805417a5d2a9a79a3858b82d60169178f59c6f1.tar.gz gcc-7805417a5d2a9a79a3858b82d60169178f59c6f1.tar.bz2 |
predict.c (predict_paths_leading_to, [...]): Add in_loop parameter.
* predict.c (predict_paths_leading_to, predict_paths_leading_to_edge):
Add in_loop parameter.
(predict_loops): Add loop guard heuristics.
* predict.def (PRED_LOOP_GUARD): New heuristics.
* gcc.dg/predict-11.c: New testcase.
* gfortran.dg/predict-2.f90: New testcase.
From-SVN: r237781
Diffstat (limited to 'gcc/predict.def')
-rw-r--r-- | gcc/predict.def | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/predict.def b/gcc/predict.def index 2f6d6cd..7feb8c3 100644 --- a/gcc/predict.def +++ b/gcc/predict.def @@ -151,6 +151,14 @@ DEF_PREDICTOR (PRED_LOOP_IV_COMPARE_GUESS, "guess loop iv compare", DEF_PREDICTOR (PRED_LOOP_IV_COMPARE, "loop iv compare", PROB_VERY_LIKELY, PRED_FLAG_FIRST_MATCH) +/* In the following code + for (loop1) + if (cond) + for (loop2) + body; + guess that cond is unlikely. */ +DEF_PREDICTOR (PRED_LOOP_GUARD, "loop guard", HITRATE (66), 0) + /* Branches to hot labels are likely. */ DEF_PREDICTOR (PRED_HOT_LABEL, "hot label", HITRATE (85), 0) |