Commit 77b7d74b by Martin Jambor Committed by Martin Jambor

cgraphunit.c (expand_thunk): If not expanding, set analyzed flag.

2014-09-10  Martin Jambor  <mjambor@suse.cz>

	* cgraphunit.c (expand_thunk): If not expanding, set analyzed flag.
	(analyze): Do not set analyze flag if expand_thunk returns false;.
	(create_wrapper): Likewise.
	* cgraphclones.c (duplicate_thunk_for_node): Likewise.

From-SVN: r215123
parent bec63208
2014-09-10 Martin Jambor <mjambor@suse.cz> 2014-09-10 Martin Jambor <mjambor@suse.cz>
* cgraphunit.c (expand_thunk): If not expanding, set analyzed flag.
(analyze): Do not set analyze flag if expand_thunk returns false;.
(create_wrapper): Likewise.
* cgraphclones.c (duplicate_thunk_for_node): Likewise.
2014-09-10 Martin Jambor <mjambor@suse.cz>
PR ipa/61654 PR ipa/61654
* cgraphclones.c (duplicate_thunk_for_node): Copy arguments of the * cgraphclones.c (duplicate_thunk_for_node): Copy arguments of the
new decl properly. Analyze the new thunk if it is expanded. new decl properly. Analyze the new thunk if it is expanded.
...@@ -371,9 +371,7 @@ duplicate_thunk_for_node (cgraph_node *thunk, cgraph_node *node) ...@@ -371,9 +371,7 @@ duplicate_thunk_for_node (cgraph_node *thunk, cgraph_node *node)
CGRAPH_FREQ_BASE); CGRAPH_FREQ_BASE);
e->call_stmt_cannot_inline_p = true; e->call_stmt_cannot_inline_p = true;
symtab->call_edge_duplication_hooks (thunk->callees, e); symtab->call_edge_duplication_hooks (thunk->callees, e);
if (!new_thunk->expand_thunk (false, false)) if (new_thunk->expand_thunk (false, false))
new_thunk->analyzed = true;
else
{ {
new_thunk->thunk.thunk_p = false; new_thunk->thunk.thunk_p = false;
new_thunk->analyze (); new_thunk->analyze ();
......
...@@ -576,7 +576,6 @@ cgraph_node::analyze (void) ...@@ -576,7 +576,6 @@ cgraph_node::analyze (void)
if (!expand_thunk (false, false)) if (!expand_thunk (false, false))
{ {
thunk.alias = NULL; thunk.alias = NULL;
analyzed = true;
return; return;
} }
thunk.alias = NULL; thunk.alias = NULL;
...@@ -1451,7 +1450,10 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) ...@@ -1451,7 +1450,10 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
tree restype = TREE_TYPE (TREE_TYPE (thunk_fndecl)); tree restype = TREE_TYPE (TREE_TYPE (thunk_fndecl));
if (!output_asm_thunks) if (!output_asm_thunks)
return false; {
analyzed = true;
return false;
}
if (in_lto_p) if (in_lto_p)
get_body (); get_body ();
...@@ -2313,9 +2315,7 @@ cgraph_node::create_wrapper (cgraph_node *target) ...@@ -2313,9 +2315,7 @@ cgraph_node::create_wrapper (cgraph_node *target)
cgraph_edge *e = create_edge (target, NULL, 0, CGRAPH_FREQ_BASE); cgraph_edge *e = create_edge (target, NULL, 0, CGRAPH_FREQ_BASE);
if (!expand_thunk (false, true)) expand_thunk (false, true);
analyzed = true;
e->call_stmt_cannot_inline_p = true; e->call_stmt_cannot_inline_p = true;
/* Inline summary set-up. */ /* Inline summary set-up. */
......
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