ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for roundoff errors.
authorJan Hubicka <hubicka@ucw.cz>
Fri, 17 Nov 2017 17:43:24 +0000 (18:43 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 17 Nov 2017 17:43:24 +0000 (17:43 +0000)
* ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
roundoff errors.

From-SVN: r254886

gcc/ChangeLog
gcc/ipa-fnsummary.c

index da0066e00547579614d5b3c263c05c3abccd8e0f..c24c0a5f343c473e02fc44265cc4b82fa0a392e8 100644 (file)
@@ -1,3 +1,8 @@
+2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
+       roundoff errors.
+
 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-cp.c (update_profiling_info): Handle conversion to local
index 1b99194a26736ac51ecc1d93039013bff14815bf..4b5cd70ea85922c8fffc235125df54e7ae0ff79c 100644 (file)
@@ -2744,7 +2744,7 @@ estimate_node_size_and_time (struct cgraph_node *node,
   gcc_checking_assert (time >= 0);
   /* nonspecialized_time should be always bigger than specialized time.
      Roundoff issues however may get into the way.  */
-  gcc_checking_assert ((nonspecialized_time - time) >= -1);
+  gcc_checking_assert ((nonspecialized_time - time * 0.99) >= -1);
 
   /* Roundoff issues may make specialized time bigger than nonspecialized
      time.  We do not really want that to happen because some heurstics