aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-01-05 23:47:24 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-01-05 22:47:24 +0000
commitf256c2743099dca4e5708d51d423c6ca70c4afb6 (patch)
treee728e6206f4450d4d3306086625736287922b6d3 /gcc/ipa-inline.c
parentbeb04ce9d4d6b30ca881ff7f5ebd143433f84722 (diff)
downloadgcc-f256c2743099dca4e5708d51d423c6ca70c4afb6.zip
gcc-f256c2743099dca4e5708d51d423c6ca70c4afb6.tar.gz
gcc-f256c2743099dca4e5708d51d423c6ca70c4afb6.tar.bz2
invoke.texi (max-inline-insns-small): New parameters.
* doc/invoke.texi (max-inline-insns-small): New parameters. * ipa-inline.c (want_early_inline_function_p): simplify. (want_inline_small_function_p): Fix pasto from previous patch; use max-inline-insns-small bound. * params.def (max-inline-insns-small): New param. * ipa-fnsummary.c (analyze_function_body): Initialize time/size variables correctly. From-SVN: r267603
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index b51e228..73da38c 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -637,8 +637,7 @@ want_early_inline_function_p (struct cgraph_edge *e)
if (growth <= PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SIZE))
;
- else if (!e->maybe_hot_p ()
- && growth > 0)
+ else if (!e->maybe_hot_p ())
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, e->call_stmt,
@@ -791,7 +790,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
ipa_hints hints = estimate_edge_hints (e);
int big_speedup = -1; /* compute this lazily */
- if (growth <= PARAM_VALUE (PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SIZE)))
+ if (growth <= PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SIZE))
;
/* Apply MAX_INLINE_INSNS_SINGLE limit. Do not do so when
hints suggests that inlining given function is very profitable. */
@@ -809,9 +808,8 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
want_inline = false;
}
else if (!DECL_DECLARED_INLINE_P (callee->decl)
- && (in_lto_p
- && growth >= PARAM_VALUE (PARAM_EARLY_INLINING_INSNS))
- && !opt_for_fn (e->caller->decl, flag_inline_functions))
+ && !opt_for_fn (e->caller->decl, flag_inline_functions)
+ && growth >= PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SMALL))
{
/* growth_likely_positive is expensive, always test it last. */
if (growth >= MAX_INLINE_INSNS_SINGLE