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-analysis.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-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index c471e0c..dfe3058 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -671,6 +671,11 @@ dump_inline_hints (FILE *f, inline_hints hints) hints &= ~INLINE_HINT_array_index; fprintf (f, " array_index"); } + if (hints & INLINE_HINT_known_hot) + { + hints &= ~INLINE_HINT_known_hot; + fprintf (f, " known_hot"); + } gcc_assert (!hints); } @@ -3666,6 +3671,17 @@ do_estimate_edge_time (struct cgraph_edge *edge) &known_aggs); estimate_node_size_and_time (callee, clause, known_vals, known_binfos, known_aggs, &size, &min_size, &time, &hints, es->param); + + /* When we have profile feedback, we can quite safely identify hot + edges and for those we disable size limits. Don't do that when + probability that caller will call the callee is low however, since it + may hurt optimization of the caller's hot path. */ + if (edge->count && cgraph_maybe_hot_edge_p (edge) + && (edge->count * 2 + > (edge->caller->global.inlined_to + ? edge->caller->global.inlined_to->count : edge->caller->count))) + hints |= INLINE_HINT_known_hot; + known_vals.release (); known_binfos.release (); known_aggs.release (); |