summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-21 06:54:01 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-21 06:54:01 +0000
commit7c07aa3d93eaaa678e5df2caf9750a692587fc76 (patch)
treeea6cdcf31028e9bf0f6d2317cb87f6e7a3668c5b /gcc/ipa-inline.c
parent7982f4b50bf0b40dd7e31cc870310b2bfdc36c4c (diff)
downloadgcc-7c07aa3d93eaaa678e5df2caf9750a692587fc76.tar.gz
PR fortran/48636
* ipa-inline.c (want_inline_small_function_p): Take loop_iterations hint. (edge_badness): Likewise. * ipa-inline.h (inline_hints_vals): Add INLINE_HINT_loop_iterations. (inline_summary): Add loop_iterations. * ipa-inline-analysis.c: Include tree-scalar-evolution.h. (dump_inline_hints): Dump loop_iterations. (reset_inline_summary): Free loop_iterations. (inline_node_duplication_hook): Update loop_iterations. (dump_inline_summary): Dump loop_iterations. (will_be_nonconstant_expr_predicate): New function. (estimate_function_body_sizes): Analyze loops. (estimate_node_size_and_time): Set hint loop_iterations. (inline_merge_summary): Merge loop iterations. (inline_read_section): Stream in loop_iterations. (inline_write_summary): Stream out loop_iterations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190556 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 55d9a521c32..a1d703a6b7f 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -480,7 +480,8 @@ want_inline_small_function_p (struct cgraph_edge *e, bool report)
hints suggests that inlining given function is very profitable. */
else if (DECL_DECLARED_INLINE_P (callee->symbol.decl)
&& growth >= MAX_INLINE_INSNS_SINGLE
- && !(hints & INLINE_HINT_indirect_call))
+ && !(hints & (INLINE_HINT_indirect_call
+ | INLINE_HINT_loop_iterations)))
{
e->inline_failed = CIF_MAX_INLINE_INSNS_SINGLE_LIMIT;
want_inline = false;
@@ -863,7 +864,8 @@ edge_badness (struct cgraph_edge *edge, bool dump)
if (dump)
fprintf (dump_file, "Badness overflow\n");
}
- if (hints & INLINE_HINT_indirect_call)
+ if (hints & (INLINE_HINT_indirect_call
+ | INLINE_HINT_loop_iterations))
badness /= 8;
if (dump)
{