diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-20 20:38:29 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-20 20:38:29 +0000 |
commit | 9d95b2b0274da8229a9c7961422e0f7d44d714fd (patch) | |
tree | 25c6e4482c10189121acfa2bf0f54130a9876b63 /gcc/tree-nested.c | |
parent | b71b0310532ccb4edefc4326ed8ff7d945b57df4 (diff) | |
download | gcc-9d95b2b0274da8229a9c7961422e0f7d44d714fd.tar.gz |
PR middle-end/16460
* 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.
* utils.c (gnat_finalize): Remove.
(end_subprog_body): Directly call cgraph_finalize_function;
do not lower the nested functions.
* trans-decl.c (build_entry_thunks): Finalize the function; do not lower
tree.
(gfc_generate_function_code): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r-- | gcc/tree-nested.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 135ac0486a8..d2608a837f0 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -1207,6 +1207,7 @@ finalize_nesting_tree_1 (struct nesting_info *root) tree stmt_list = NULL; tree context = root->context; struct function *sf; + struct cgraph_node *node; /* If we created a non-local frame type or decl, we need to lay them out at this time. */ @@ -1317,6 +1318,15 @@ finalize_nesting_tree_1 (struct nesting_info *root) /* Dump the translated tree function. */ dump_function (TDI_nested, root->context); + node = cgraph_node (root->context); + + /* For nested functions update the cgraph to reflect unnesting. + We also delay finalizing of these functions up to this point. */ + if (node->origin) + { + cgraph_unnest_node (cgraph_node (root->context)); + cgraph_finalize_function (root->context, true); + } } static void |