* predict.c (maybe_hot_frequency_p): Avoid division.
authorJan Hubicka <hubicka@ucw.cz>
Sun, 29 May 2016 17:29:42 +0000 (19:29 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 29 May 2016 17:29:42 +0000 (17:29 +0000)
From-SVN: r236862

gcc/ChangeLog
gcc/predict.c

index 230f20059c6237357eadaa01a0c04915b200205f..41b863b60f36cad2b8a1550cc215b29bbabd258e 100644 (file)
@@ -1,3 +1,7 @@
+2016-05-27  Jan Hubicka  <hubicka@ucw.cz>
+
+       * predict.c (maybe_hot_frequency_p): Avoid division.
+
 2016-05-28  Gerald Pfeifer  <gerald@pfeifer.com>
 
        * doc/install.texi: Use https for shop.fsf.org.
index 3743b0107a603656cd425af0a4f6ef3dbc77b198..31c5565c309940e2097ce343cec30acc598dd306 100644 (file)
@@ -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;
 }