ipa-inline.c (edge_badness): Use inlined_time instead of inline_summaries->get.
authorJan Hubicka <hubicka@ucw.cz>
Mon, 22 May 2017 13:56:52 +0000 (15:56 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 22 May 2017 13:56:52 +0000 (13:56 +0000)
* ipa-inline.c (edge_badness): Use inlined_time instead of
inline_summaries->get.

From-SVN: r248334

gcc/ChangeLog
gcc/ipa-inline.c

index 46f39ae486cf12b51f16d45957c03119a2384111..43a5e7387be40281e7c781a39a0bd2588b3d5426 100644 (file)
@@ -1,3 +1,12 @@
+2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-inline.c (edge_badness): Use inlined_time instead of
+       inline_summaries->get.
+
+2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
+
 2017-05-22  Nathan Sidwell  <nathan@acm.org>
 
        * doc/invoke.texi (fdump-translation-unit): Delete documentation.
index b0d589081d8d6ce5dcdb49485261b77e4d3ae533..f13f983dfdde83700e836e8f47036df866748ff1 100644 (file)
@@ -1066,9 +1066,10 @@ edge_badness (struct cgraph_edge *edge, bool dump)
     {
       sreal numerator, denominator;
       int overall_growth;
+      sreal inlined_time = compute_inlined_call_time (edge, edge_time);
 
       numerator = (compute_uninlined_call_time (edge, unspec_edge_time)
-                  - compute_inlined_call_time (edge, edge_time));
+                  - inlined_time);
       if (numerator == 0)
        numerator = ((sreal) 1 >> 8);
       if (caller->count)
@@ -1144,7 +1145,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
            overall_growth += 256 * 256 - 256;
          denominator *= overall_growth;
         }
-      denominator *= inline_summaries->get (caller)->self_size + growth;
+      denominator *= inlined_time;
 
       badness = - numerator / denominator;