Commit 1a94c545 by Jan Hubicka

cgraph.c (cgraph_unnest_node): New function.



	* cgraph.c (cgraph_unnest_node): New function.
	(c_finalize): Rename to ....
	(c_warn_unused_result_recursivly): ... this one; do only the warning
	(finish_function): Finalize the toplevel function; do not lower nested tree.
	* cgraph.h (cgraph_unnest_node): Declare.
	* cgraphunit.c (decide_is_function_needed): Do not use cgraph
	nestedness datastructure.
	* cse.c (cse_insn): Do not cprop nonlocal LABEL_REFs.
	* reload1.c (set_label_offsets): Fix call of set_label_offsets.
	* tree-nested.c (finlize_nesting_tree_1):  Use un-nesting code.

From-SVN: r87771
parent 8f235343
...@@ -6128,30 +6128,21 @@ store_parm_decls (void) ...@@ -6128,30 +6128,21 @@ store_parm_decls (void)
cfun->x_dont_save_pending_sizes_p = 1; cfun->x_dont_save_pending_sizes_p = 1;
} }
/* Give FNDECL and all its nested functions to cgraph for compilation. */ /* Handle attribute((warn_unused_result)) on FNDECL and all its nested
functions. */
static void static void
c_finalize (tree fndecl) c_warn_unused_result_recursively (tree fndecl)
{ {
struct cgraph_node *cgn; struct cgraph_node *cgn;
/* Handle attribute((warn_unused_result)). Relies on gimple input. */ /* Handle attribute((warn_unused_result)). Relies on gimple input. */
c_warn_unused_result (&DECL_SAVED_TREE (fndecl)); c_warn_unused_result (&DECL_SAVED_TREE (fndecl));
/* ??? Objc emits functions after finalizing the compilation unit.
This should be cleaned up later and this conditional removed. */
if (cgraph_global_info_ready)
{
c_expand_body (fndecl);
return;
}
/* Finalize all nested functions now. */ /* Finalize all nested functions now. */
cgn = cgraph_node (fndecl); cgn = cgraph_node (fndecl);
for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested) for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested)
c_finalize (cgn->decl); c_warn_unused_result_recursively (cgn->decl);
cgraph_finalize_function (fndecl, false);
} }
/* Finish up a function declaration and compile that function /* Finish up a function declaration and compile that function
...@@ -6255,8 +6246,17 @@ finish_function (void) ...@@ -6255,8 +6246,17 @@ finish_function (void)
if (!decl_function_context (fndecl)) if (!decl_function_context (fndecl))
{ {
c_genericize (fndecl); c_genericize (fndecl);
lower_nested_functions (fndecl); c_warn_unused_result_recursively (fndecl);
c_finalize (fndecl);
/* ??? Objc emits functions after finalizing the compilation unit.
This should be cleaned up later and this conditional removed. */
if (cgraph_global_info_ready)
{
c_expand_body (fndecl);
return;
}
cgraph_finalize_function (fndecl, false);
} }
else else
{ {
......
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