ipa-inline.c (edge_badness): Dump sreal frequency.
authorJan Hubicka <hubicka@ucw.cz>
Tue, 14 Nov 2017 19:30:59 +0000 (20:30 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 14 Nov 2017 19:30:59 +0000 (19:30 +0000)
* ipa-inline.c (edge_badness): Dump sreal frequency.
(compute_inlined_call_time): Match natural implementaiton ...
* ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
forgotten division by CGRAPH_FREQ_BASE.

From-SVN: r254738

gcc/ChangeLog
gcc/ipa-fnsummary.c
gcc/ipa-inline.c

index 3cee433799c1c686a76cb20165f5a6516587d35f..a290ecbba857d2d2b089888194119161da931148 100644 (file)
@@ -1,3 +1,10 @@
+2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-inline.c (edge_badness): Dump sreal frequency.
+       (compute_inlined_call_time): Match natural implementaiton ...
+       * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
+       forgotten division by CGRAPH_FREQ_BASE.
+
 2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
index ddc16bd50d7d6068db1339e08781f0f2761eb1f2..8e26e7e257ab94f7041b041c77cf83d012ccac00 100644 (file)
@@ -2581,8 +2581,7 @@ estimate_edge_size_and_time (struct cgraph_edge *e, int *size, int *min_size,
   if (prob == REG_BR_PROB_BASE)
     *time += ((sreal)call_time) * e->sreal_frequency ();
   else
-    *time += ((sreal)call_time * prob) * e->sreal_frequency ()
-             / CGRAPH_FREQ_BASE;
+    *time += ((sreal)call_time * prob) * e->sreal_frequency ();
 }
 
 
index 91bf8e67e8a228dc38d2711d2b45d8b5204abbfd..8d9ecb26d238dd7b52a22532c9a0ee8e51e32840 100644 (file)
@@ -670,8 +670,7 @@ compute_inlined_call_time (struct cgraph_edge *edge,
 
   /* This calculation should match one in ipa-inline-analysis.c
      (estimate_edge_size_and_time).  */
-  time -= (sreal) edge->frequency ()
-          * ipa_call_summaries->get (edge)->call_stmt_time / CGRAPH_FREQ_BASE;
+  time -= (sreal)ipa_call_summaries->get (edge)->call_stmt_time * freq;
   time += caller_time;
   if (time <= 0)
     time = ((sreal) 1) >> 8;
@@ -1164,7 +1163,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
                   " overall growth %i (current) %i (original)"
                   " %i (compensated)\n",
                   badness.to_double (),
-                 (double)edge->frequency () / CGRAPH_FREQ_BASE,
+                  edge->sreal_frequency ().to_double (),
                   edge->count.ipa ().initialized_p () ? edge->count.ipa ().to_gcov_type () : -1,
                   caller->count.ipa ().initialized_p () ? caller->count.ipa ().to_gcov_type () : -1,
                   compute_uninlined_call_time (edge,