diff options
author | Jan Hubicka <jh@suse.cz> | 2012-08-21 08:54:01 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2012-08-21 06:54:01 +0000 |
commit | 2daffc47991e582d910b576e41891a7e91524575 (patch) | |
tree | ea6cdcf31028e9bf0f6d2317cb87f6e7a3668c5b /gcc/testsuite | |
parent | e162e288ecf5a5eb16bd6c0cb432afa233e1e10b (diff) | |
download | gcc-2daffc47991e582d910b576e41891a7e91524575.zip gcc-2daffc47991e582d910b576e41891a7e91524575.tar.gz gcc-2daffc47991e582d910b576e41891a7e91524575.tar.bz2 |
re PR fortran/48636 (Enable more inlining with -O2 and higher)
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.
From-SVN: r190556
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/inlinehint-1.c | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 84895e1..f6151fc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-08-20 Jan Hubicka <jh@suse.cz> + + PR fortran/48636 + * gcc.dg/ipa/inlinehint-1.c: New. + 2012-08-20 Florian Weimer <fweimer@redhat.com> PR c++/19351 diff --git a/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c b/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c new file mode 100644 index 0000000..9810e25 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c @@ -0,0 +1,16 @@ +/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */ +test (int a) +{ + int i; + for (i=0; i<a; i++) +{ + test2(a); + test2(a); +} +} +m() +{ + test (10); +} +/* { dg-final { scan-ipa-dump "loop_iterations" "inline" } } */ +/* { dg-final { cleanup-ipa-dump "inline" } } */ |