Commit d67bce7c by Jan Hubicka Committed by Jan Hubicka

ipa-inline.c (early_inliner): Skip inlining only in always_inlined...


	* ipa-inline.c (early_inliner): Skip inlining only in always_inlined;
	if some always_inline was inlined, apply changes before inlining
	heuristically.

	* g++.dg/ipa/devirt-37.C: Disable early inlining.

From-SVN: r220359
parent a4bb6959
2015-02-02 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline.c (early_inliner): Skip inlining only in always_inlined;
if some always_inline was inlined, apply changes before inlining
heuristically.
2015-02-02 David Malcolm <dmalcolm@redhat.com> 2015-02-02 David Malcolm <dmalcolm@redhat.com>
PR jit/64810 PR jit/64810
......
...@@ -2528,7 +2528,9 @@ early_inliner (function *fun) ...@@ -2528,7 +2528,9 @@ early_inliner (function *fun)
cycles of edges to be always inlined in the callgraph. cycles of edges to be always inlined in the callgraph.
We might want to be smarter and just avoid this type of inlining. */ We might want to be smarter and just avoid this type of inlining. */
|| DECL_DISREGARD_INLINE_LIMITS (node->decl)) || (DECL_DISREGARD_INLINE_LIMITS (node->decl)
&& lookup_attribute ("always_inline",
DECL_ATTRIBUTES (node->decl))))
; ;
else if (lookup_attribute ("flatten", else if (lookup_attribute ("flatten",
DECL_ATTRIBUTES (node->decl)) != NULL) DECL_ATTRIBUTES (node->decl)) != NULL)
...@@ -2543,6 +2545,18 @@ early_inliner (function *fun) ...@@ -2543,6 +2545,18 @@ early_inliner (function *fun)
} }
else else
{ {
/* If some always_inline functions was inlined, apply the changes.
This way we will not account always inline into growth limits and
moreover we will inline calls from always inlines that we skipped
previously becuase of conditional above. */
if (inlined)
{
timevar_push (TV_INTEGRATION);
todo |= optimize_inline_calls (current_function_decl);
inline_update_overall_summary (node);
inlined = false;
timevar_pop (TV_INTEGRATION);
}
/* We iterate incremental inlining to get trivial cases of indirect /* We iterate incremental inlining to get trivial cases of indirect
inlining. */ inlining. */
while (iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS) while (iterations < PARAM_VALUE (PARAM_EARLY_INLINER_MAX_ITERATIONS)
......
2015-02-02 Jan Hubicka <hubicka@ucw.cz>
* g++.dg/ipa/devirt-37.C: Disable early inlining.
2015-02-02 Christophe Lyon <christophe.lyon@linaro.org> 2015-02-02 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h * gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h
......
/* { dg-options "-fpermissive -O2 -fno-indirect-inlining -fno-devirtualize-speculatively -fdump-tree-fre2-details" } */ /* { dg-options "-fpermissive -O2 -fno-indirect-inlining -fno-devirtualize-speculatively -fdump-tree-fre2-details -fno-early-inlining" } */
#include <stdlib.h> #include <stdlib.h>
struct A {virtual void test() {abort ();}}; struct A {virtual void test() {abort ();}};
struct B:A struct B:A
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment