From f0b03e9423c1965ba30cd90ce248475423fd55a9 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 29 May 2016 19:29:42 +0200 Subject: [PATCH] * predict.c (maybe_hot_frequency_p): Avoid division. From-SVN: r236862 --- gcc/ChangeLog | 4 ++++ gcc/predict.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 230f20059c6..41b863b60f3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-05-27 Jan Hubicka + + * predict.c (maybe_hot_frequency_p): Avoid division. + 2016-05-28 Gerald Pfeifer * doc/install.texi: Use https for shop.fsf.org. diff --git a/gcc/predict.c b/gcc/predict.c index 3743b0107a6..31c5565c309 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -115,8 +115,8 @@ maybe_hot_frequency_p (struct function *fun, int freq) return false; if (PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION) == 0) return false; - if (freq < (ENTRY_BLOCK_PTR_FOR_FN (fun)->frequency - / PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION))) + if (freq * PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION) + < ENTRY_BLOCK_PTR_FOR_FN (fun)->frequency) return false; return true; } -- 2.30.2