aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-08-31 13:40:11 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-08-31 11:40:11 +0000
commit277b4867eee3e48b4423e7341b9b5670f827d1c8 (patch)
tree57ded3bb457ee70d3fede2ec7f8847787321ac33 /gcc/predict.c
parent8518c095a8aaa6375e1e7046c824d7c2a9893855 (diff)
downloadgcc-277b4867eee3e48b4423e7341b9b5670f827d1c8.zip
gcc-277b4867eee3e48b4423e7341b9b5670f827d1c8.tar.gz
gcc-277b4867eee3e48b4423e7341b9b5670f827d1c8.tar.bz2
cold-attribute-1.c: New testcase.
* gcc.target/i386/cold-attribute-1.c: New testcase. * gcc.target/i386/cold-attribute-2.c: New testcase. * gcc.target/i386/cold-attribute-3.c: New testcase. * gcc.target/i386/cold-attribute-4.c: New testcase. * predict.c (PROB_VERY_LIKELY): Make small enough so things become cold. * predict.def (PRED_NORETURN_CALL, PRED_COLD_CALL): Use it. From-SVN: r139827
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index 6ca1a0c..e02f9f8 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -66,8 +66,10 @@ along with GCC; see the file COPYING3. If not see
static sreal real_zero, real_one, real_almost_one, real_br_prob_base,
real_inv_br_prob_base, real_one_half, real_bb_freq_max;
-/* Random guesstimation given names. */
-#define PROB_VERY_UNLIKELY (REG_BR_PROB_BASE / 100 - 1)
+/* Random guesstimation given names.
+ PROV_VERY_UNLIKELY should be small enough so basic block predicted
+ by it gets bellow HOT_BB_FREQUENCY_FRANCTION. */
+#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)