aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-07-25 16:07:29 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2019-07-25 16:07:29 +0000
commit5ab2422adf894bdf84deed8c7c0557c16d6dca2b (patch)
tree0b3f29e17af61b133ca4870bda6e49e4fd6a75dc /gcc/ipa-inline.c
parent75088696935c7e179699cb448e0a2cee74c8494f (diff)
downloadgcc-5ab2422adf894bdf84deed8c7c0557c16d6dca2b.zip
gcc-5ab2422adf894bdf84deed8c7c0557c16d6dca2b.tar.gz
gcc-5ab2422adf894bdf84deed8c7c0557c16d6dca2b.tar.bz2
cif-code.def (NEVER_CALL): New code.
* cif-code.def (NEVER_CALL): New code. * ipa-inline.c (want_inline_small_function_p): Fix formatting issues. Set the failure to CIF_NEVER_CALL if the IPA count is zero. From-SVN: r273804
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 5862d00..0ed965a 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -810,7 +810,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
| INLINE_HINT_loop_stride))
&& !(big_speedup = big_speedup_p (e)))))
{
- e->inline_failed = CIF_MAX_INLINE_INSNS_SINGLE_LIMIT;
+ e->inline_failed = CIF_MAX_INLINE_INSNS_SINGLE_LIMIT;
want_inline = false;
}
else if (!DECL_DECLARED_INLINE_P (callee->decl)
@@ -818,12 +818,12 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
&& growth >= PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SMALL))
{
/* growth_likely_positive is expensive, always test it last. */
- if (growth >= MAX_INLINE_INSNS_SINGLE
+ if (growth >= MAX_INLINE_INSNS_SINGLE
|| growth_likely_positive (callee, growth))
{
- e->inline_failed = CIF_NOT_DECLARED_INLINED;
+ e->inline_failed = CIF_NOT_DECLARED_INLINED;
want_inline = false;
- }
+ }
}
/* Apply MAX_INLINE_INSNS_AUTO limit for functions not declared inline
Upgrade it to MAX_INLINE_INSNS_SINGLE when hints suggests that
@@ -839,19 +839,22 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
&& !(big_speedup == -1 ? big_speedup_p (e) : big_speedup))
{
/* growth_likely_positive is expensive, always test it last. */
- if (growth >= MAX_INLINE_INSNS_SINGLE
+ if (growth >= MAX_INLINE_INSNS_SINGLE
|| growth_likely_positive (callee, growth))
{
e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT;
want_inline = false;
- }
+ }
}
/* If call is cold, do not inline when function body would grow. */
else if (!e->maybe_hot_p ()
&& (growth >= MAX_INLINE_INSNS_SINGLE
|| growth_likely_positive (callee, growth)))
{
- e->inline_failed = CIF_UNLIKELY_CALL;
+ if (e->count.ipa () == profile_count::zero ())
+ e->inline_failed = CIF_NEVER_CALL;
+ else
+ e->inline_failed = CIF_UNLIKELY_CALL;
want_inline = false;
}
}