aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.def
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-06-25 13:56:52 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2016-06-25 11:56:52 +0000
commit888ed1a39a46d55a7c1f2357d31eb4b59e4dc721 (patch)
tree412e6f58c87e87e9651ee2208731ac15e90260c8 /gcc/predict.def
parent1527dee9df41b5130f0d767f91bc89f9c990535c (diff)
downloadgcc-888ed1a39a46d55a7c1f2357d31eb4b59e4dc721.zip
gcc-888ed1a39a46d55a7c1f2357d31eb4b59e4dc721.tar.gz
gcc-888ed1a39a46d55a7c1f2357d31eb4b59e4dc721.tar.bz2
predict.c: Include ipa-utils.h
* predict.c: Include ipa-utils.h (tree_bb_level_prediction): Predict recursive calls. (tree_estimate_probability_bb): Skip inexpensive calls for call predictor. * predict.def (PRED_RECURSIVE_CALL): New. * gcc.dg/predict-10.c: New test. From-SVN: r237780
Diffstat (limited to 'gcc/predict.def')
-rw-r--r--gcc/predict.def3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/predict.def b/gcc/predict.def
index d3bc757..2f6d6cd 100644
--- a/gcc/predict.def
+++ b/gcc/predict.def
@@ -112,6 +112,9 @@ DEF_PREDICTOR (PRED_TREE_FPOPCODE, "fp_opcode (on trees)", HITRATE (90), 0)
/* Branch guarding call is probably taken. */
DEF_PREDICTOR (PRED_CALL, "call", HITRATE (67), 0)
+/* Recursive calls are usually not taken or the function will recurse indefinitely. */
+DEF_PREDICTOR (PRED_RECURSIVE_CALL, "recursive call", HITRATE (75), 0)
+
/* Branch causing function to terminate is probably not taken.
FIXME: early return currently predicts code:
int foo (int a)