diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-04-18 21:36:01 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-04-18 19:36:01 +0000 |
commit | b6d627e4724edc68777c8b2f5e11aad99a1dd2e3 (patch) | |
tree | 567c2bc65a81805dc3e2d84f184eaba4dbf52d6c /gcc/ipa-inline.c | |
parent | e86a910ff5b8ecfeeeb1e57bffcb85887b771f9a (diff) | |
download | gcc-b6d627e4724edc68777c8b2f5e11aad99a1dd2e3.zip gcc-b6d627e4724edc68777c8b2f5e11aad99a1dd2e3.tar.gz gcc-b6d627e4724edc68777c8b2f5e11aad99a1dd2e3.tar.bz2 |
ipa-inline.h (INLINE_HINT_known_hot): New hint.
* ipa-inline.h (INLINE_HINT_known_hot): New hint.
* ipa-inline-analysis.c (dump_inline_hints): Dump it.
(do_estimate_edge_time): Compute it.
* ipa-inline.c (want_inline_small_function_p): Bypass
INLINE_INSNS_AUTO/SINGLE limits for calls that are known
to be hot.
From-SVN: r209523
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 1b7a74e..65e6533 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -578,18 +578,21 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report) inline cnadidate. At themoment we allow inline hints to promote non-inline function to inline and we increase MAX_INLINE_INSNS_SINGLE 16fold for inline functions. */ - else if (!DECL_DECLARED_INLINE_P (callee->decl) + else if ((!DECL_DECLARED_INLINE_P (callee->decl) + && (!e->count || !cgraph_maybe_hot_edge_p (e))) && inline_summary (callee)->min_size - inline_edge_summary (e)->call_stmt_size > MAX (MAX_INLINE_INSNS_SINGLE, MAX_INLINE_INSNS_AUTO)) { e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT; want_inline = false; } - else if (DECL_DECLARED_INLINE_P (callee->decl) + else if ((DECL_DECLARED_INLINE_P (callee->decl) || e->count) && inline_summary (callee)->min_size - inline_edge_summary (e)->call_stmt_size > 16 * MAX_INLINE_INSNS_SINGLE) { - e->inline_failed = CIF_MAX_INLINE_INSNS_AUTO_LIMIT; + e->inline_failed = (DECL_DECLARED_INLINE_P (callee->decl) + ? CIF_MAX_INLINE_INSNS_SINGLE_LIMIT + : CIF_MAX_INLINE_INSNS_AUTO_LIMIT); want_inline = false; } else @@ -606,6 +609,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report) && growth >= MAX_INLINE_INSNS_SINGLE && ((!big_speedup && !(hints & (INLINE_HINT_indirect_call + | INLINE_HINT_known_hot | INLINE_HINT_loop_iterations | INLINE_HINT_array_index | INLINE_HINT_loop_stride))) @@ -630,6 +634,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report) inlining given function is very profitable. */ else if (!DECL_DECLARED_INLINE_P (callee->decl) && !big_speedup + && !(hints & INLINE_HINT_known_hot) && growth >= ((hints & (INLINE_HINT_indirect_call | INLINE_HINT_loop_iterations | INLINE_HINT_array_index |