cgraph_expand_function (struct cgraph_node *node)
{
tree decl = node->decl;
- struct cgraph_edge *e;
if (flag_unit_at_a_time)
announce_function (decl);
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;
}
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);
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.
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
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