cgraphunit.c (cgraph_expand_function): Use cgraph_possibly_inlined_p.
authorJan Hubicka <hubicka@gcc.gnu.org>
Sun, 9 Nov 2003 02:37:54 +0000 (02:37 +0000)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 9 Nov 2003 02:37:54 +0000 (02:37 +0000)
* cgraphunit.c (cgraph_expand_function): Use
cgraph_possibly_inlined_p.
* tree-optimize.c (tree_rest_of_compilation): Do not kill saved tree.

* opts.c (common_handle_option): Do not set max-inline-insns.
* params.def: Update comments.
(PARAM_MAX_INLINE_INSNS): Kill.
* invoke.texi (max-inline-insns): Kill.

From-SVN: r73384

gcc/cgraphunit.c
gcc/opts.c
gcc/params.def
gcc/tree-optimize.c

index 673419fa008fafb376b267918198c6266f21e63b..672b753bc46df0b621ecfc2408e92ab782d375a4 100644 (file)
@@ -486,7 +486,6 @@ static void
 cgraph_expand_function (struct cgraph_node *node)
 {
   tree decl = node->decl;
-  struct cgraph_edge *e;
 
   if (flag_unit_at_a_time)
     announce_function (decl);
@@ -497,21 +496,8 @@ cgraph_expand_function (struct cgraph_node *node)
      via lang_expand_decl_stmt.  */
   (*lang_hooks.callgraph.expand_function) (decl);
 
-  if (!flag_unit_at_a_time)
-    {
-       if (!node->local.inlinable
-          || (!node->local.disregard_inline_limits
-              && !cgraph_default_inline_p (node)))
-        DECL_SAVED_TREE (node->decl) = NULL;
-    }
-  else
-    {
-      for (e = node->callers; e; e = e->next_caller)
-       if (e->inline_call)
-         break;
-      if (!e)
-       DECL_SAVED_TREE (decl) = NULL;
-    }
+  if (!cgraph_function_possibly_inlined_p (decl))
+    DECL_SAVED_TREE (decl) = NULL;
   current_function_decl = NULL;
 }
 
index dafd37104b42bf7e09c84735e210b4f9a29cbe38..694cac74a7df9c1214dc9d3c08546cffec54d48f 100644 (file)
@@ -1057,7 +1057,6 @@ common_handle_option (size_t scode, const char *arg,
 
     case OPT_finline_limit_:
     case OPT_finline_limit_eq:
-      set_param_value ("max-inline-insns", value);
       set_param_value ("max-inline-insns-single", value / 2);
       set_param_value ("max-inline-insns-auto", value / 2);
       set_param_value ("max-inline-insns-rtl", value);
index b08603b1f29f57428da968d0c813bfe029f31372..d665ad57ba45b59473ce6965b0985b75fb6230a1 100644 (file)
@@ -39,7 +39,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    of a function counted in internal gcc instructions (not in
    real machine instructions) that is eligible for inlining
    by the tree inliner.
-   The default value is 100.
+   The default value is 500.
    Only functions marked inline (or methods defined in the class
    definition for C++) are affected by this, unless you set the
    -finline-functions (included in -O3) compiler option.
@@ -59,31 +59,12 @@ DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
    that is applied to functions marked inlined (or defined in the
    class declaration in C++) given by the "max-inline-insns-single"
    parameter.
-   The default value is 100.  */
+   The default value is 150.  */
 DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
          "max-inline-insns-auto",
          "The maximum number of instructions when automatically inlining",
          150)
 
-/* The repeated inlining limit.  After this number of instructions 
-   (in the internal gcc representation, not real machine instructions)
-   got inlined by repeated inlining, gcc starts to decrease the maximum
-   number of inlinable instructions in the tree inliner.
-   This is done by a linear function, see "max-inline-slope" parameter.
-   It is necessary in order to limit the compile-time resources, that 
-   could otherwise become very high.
-   It is recommended to set this value to twice the value of the single
-   function limit (set by the "max-inline-insns-single" parameter) or
-   higher.  The default value is 200.
-   Higher values mean that more inlining is done, resulting in
-   better performance of the code, at the expense of higher 
-   compile-time resource (time, memory) requirements and larger
-   binaries.  */
-DEFPARAM (PARAM_MAX_INLINE_INSNS,
-         "max-inline-insns",
-         "The maximum number of instructions by repeated inlining before gcc starts to throttle inlining",
-         200)
-
 /* For languages that (still) use the RTL inliner, we can specify
    limits for the RTL inliner separately.
    The parameter here defines the maximum number of RTL instructions
index e6049cb2b29c6300418a0a1e314690e6cf23ac93..c61d34812c5dd17567cc8ae0286281ddeab9eb3e 100644 (file)
@@ -202,13 +202,6 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
   if (dump_enabled_p (TDI_all))
     /* Keep the body; we're going to dump it.  */
     ;
-  else if (DECL_INLINE (fndecl) && flag_inline_trees)
-    /* We might need the body of this function so that we can expand
-       it inline somewhere else.  */
-    ;
-  else
-    /* We don't need the body; blow it away.  */
-    DECL_SAVED_TREE (fndecl) = NULL;
 
   /* Since we don't need the RTL for this function anymore, stop pointing to
      it.  That's especially important for LABEL_DECLs, since you can reach all