diff options
author | Jan Hubicka <jh@suse.cz> | 2012-11-11 19:14:35 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2012-11-11 18:14:35 +0000 |
commit | 52843a4726629c92066668cf79979676560efce6 (patch) | |
tree | 5c72b6d621b40aab51257d773d939ff6d2be4567 /gcc/ipa-inline.c | |
parent | 6e7e4ca2e8a83335929695eca491c587ae1fcc56 (diff) | |
download | gcc-52843a4726629c92066668cf79979676560efce6.zip gcc-52843a4726629c92066668cf79979676560efce6.tar.gz gcc-52843a4726629c92066668cf79979676560efce6.tar.bz2 |
re PR fortran/48636 (Enable more inlining with -O2 and higher)
PR middle-end/48636
* ipa-inline.c (want_inline_small_function_p): Take aray index hint.
(edge_badness): Likewise.
* ipa-inline.h (inline_hints_vals): Add array_index and comments.
(inline_summary_: Add ARRAY_INDEX.
* ipa-inline-analysis.c (dump_inline_hints): Dump array_index hint.
(reset_inline_summary): Handle array_index hint.
(inline_node_duplication_hook): Likewise.
(dump_inline_summary): Likewise.
(array_index_predicate): New function.
(estimate_function_body_sizes): Use it.
(estimate_node_size_and_time): Use array_index hint.
(inline_merge_summary, inline_read_section): Likewise.
From-SVN: r193406
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index fa3d456..9f792ff 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -541,6 +541,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report) && !big_speedup && !(hints & (INLINE_HINT_indirect_call | INLINE_HINT_loop_iterations + | INLINE_HINT_array_index | INLINE_HINT_loop_stride))) { e->inline_failed = CIF_MAX_INLINE_INSNS_SINGLE_LIMIT; @@ -595,6 +596,7 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report) && !big_speedup && growth >= ((hints & (INLINE_HINT_indirect_call | INLINE_HINT_loop_iterations + | INLINE_HINT_array_index | INLINE_HINT_loop_stride)) ? MAX (MAX_INLINE_INSNS_AUTO, MAX_INLINE_INSNS_SINGLE) @@ -919,6 +921,7 @@ edge_badness (struct cgraph_edge *edge, bool dump) gcc_checking_assert (badness <=0 && badness >= INT_MIN / 16); if ((hints & (INLINE_HINT_indirect_call | INLINE_HINT_loop_iterations + | INLINE_HINT_array_index | INLINE_HINT_loop_stride)) || callee_info->growth <= 0) badness *= 8; |