Remove usage of CIF_MAX_INLINE_INSNS_SINGLE_O2_LIMIT.
authorMartin Liska <mliska@suse.cz>
Thu, 14 Nov 2019 12:12:26 +0000 (13:12 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 14 Nov 2019 12:12:26 +0000 (12:12 +0000)
2019-11-14  Martin Liska  <mliska@suse.cz>

* ipa-inline.c (want_inline_small_function_p): Use
CIF_MAX_INLINE_INSNS_AUTO_LIMIT instead
of CIF_MAX_INLINE_INSNS_SINGLE_O2_LIMIT.

From-SVN: r278219

gcc/ChangeLog
gcc/ipa-inline.c

index 7af5644024b69ee666f0457bf15034a1491acb36..348cc4107decdaddd563b8958c9a077e2c370c49 100644 (file)
@@ -1,3 +1,9 @@
+2019-11-14  Martin Liska  <mliska@suse.cz>
+
+       * ipa-inline.c (want_inline_small_function_p): Use
+       CIF_MAX_INLINE_INSNS_AUTO_LIMIT instead
+       of CIF_MAX_INLINE_INSNS_SINGLE_O2_LIMIT.
+
 2019-11-14  Martin Liska  <mliska@suse.cz>
 
        * ipa-cp.c (devirtualization_time_bonus): Use opt_for_fn
index effb59784a379a29ff4cd36cba2066b312e48469..e27859ba5d3634beed89117d53e3bd0257c8d659 100644 (file)
@@ -820,10 +820,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
                - ipa_call_summaries->get (e)->call_stmt_size
              > inline_insns_auto (e->caller, true))
     {
-      if (opt_for_fn (e->caller->decl, optimize) >= 3)
-        e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT;
-      else
-        e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_O2_LIMIT;
+      e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT;
       want_inline = false;
     }
   else if ((DECL_DECLARED_INLINE_P (callee->decl)
@@ -838,8 +835,8 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
                            : CIF_MAX_INLINE_INSNS_AUTO_LIMIT);
       else
        e->inline_failed = (DECL_DECLARED_INLINE_P (callee->decl)
-                           ? CIF_MAX_INLINE_INSNS_SINGLE_O2_LIMIT
-                           : CIF_MAX_INLINE_INSNS_AUTO_O2_LIMIT);
+                             ? CIF_MAX_INLINE_INSNS_SINGLE_O2_LIMIT
+                             : CIF_MAX_INLINE_INSNS_AUTO_LIMIT);
       want_inline = false;
     }
   else
@@ -893,10 +890,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
           if (growth >= inline_insns_single (e->caller, false)
              || growth_positive_p (callee, e, growth))
            {
-             if (opt_for_fn (e->caller->decl, optimize) >= 3)
-               e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT;
-             else
-               e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_O2_LIMIT;
+             e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT;
              want_inline = false;
            }
        }