aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.h
diff options
context:
space:
mode:
authorMarek Polacek <mpolacek@gcc.gnu.org>2013-12-04 22:47:11 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2013-12-04 22:47:11 +0000
commit31e071aeb827f49ce2e891620852198e99d44a0c (patch)
tree20fca81276f1e6d6224300c11a4e10fa89519d41 /gcc/predict.h
parent59b6687cceaf95d8c49afee88248cf4fb0a33105 (diff)
downloadgcc-31e071aeb827f49ce2e891620852198e99d44a0c.zip
gcc-31e071aeb827f49ce2e891620852198e99d44a0c.tar.gz
gcc-31e071aeb827f49ce2e891620852198e99d44a0c.tar.bz2
Implement -fsanitize=signed-integer-overflow.
From-SVN: r205684
Diffstat (limited to 'gcc/predict.h')
-rw-r--r--gcc/predict.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/predict.h b/gcc/predict.h
index 83b1695..23435dc 100644
--- a/gcc/predict.h
+++ b/gcc/predict.h
@@ -20,6 +20,16 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_PREDICT_H
#define GCC_PREDICT_H
+/* Random guesstimation given names.
+ PROB_VERY_UNLIKELY should be small enough so basic block predicted
+ by it gets below HOT_BB_FREQUENCY_FRACTION. */
+#define PROB_VERY_UNLIKELY (REG_BR_PROB_BASE / 2000 - 1)
+#define PROB_EVEN (REG_BR_PROB_BASE / 2)
+#define PROB_VERY_LIKELY (REG_BR_PROB_BASE - PROB_VERY_UNLIKELY)
+#define PROB_ALWAYS (REG_BR_PROB_BASE)
+#define PROB_UNLIKELY (REG_BR_PROB_BASE / 5 - 1)
+#define PROB_LIKELY (PROB_ALWAYS - PROB_VERY_LIKELY)
+
#define DEF_PREDICTOR(ENUM, NAME, HITRATE, FLAGS) ENUM,
enum br_predictor
{