From: Jan Hubicka Date: Sun, 9 Nov 2003 02:37:54 +0000 (+0000) Subject: cgraphunit.c (cgraph_expand_function): Use cgraph_possibly_inlined_p. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd04ab3253e35f1fa713c81d009c46ad93cb7a52;p=platform%2Fupstream%2Fgcc.git cgraphunit.c (cgraph_expand_function): Use cgraph_possibly_inlined_p. * 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 --- diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 673419f..672b753 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -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; } diff --git a/gcc/opts.c b/gcc/opts.c index dafd371..694cac7 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -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); diff --git a/gcc/params.def b/gcc/params.def index b08603b..d665ad5 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -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 diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index e6049cb..c61d348 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -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