summaryrefslogtreecommitdiff
path: root/gcc/tree-optimize.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-30 00:47:49 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-30 00:47:49 +0000
commitb3d24a23ead8e87c9b3c20c5975e350ee92f397d (patch)
tree61f3a41e0903263a69773a750d50202e1e71289e /gcc/tree-optimize.c
parenta19c36640c225f11bc278abdcb4b2e74e0fa0ae1 (diff)
downloadgcc-b3d24a23ead8e87c9b3c20c5975e350ee92f397d.tar.gz
* function.h (struct function): Add saved blocks/unexpanded var list.
* gimple-low.c (record_vars): Insert only VAR_DECLs. * tree-inline.c (add_lexical_block): Declare; do not clear sublocks. (remap_decl): Do not declare vars. (remap_block): Do not care inserting blocks. (remap_blocks): New function. (copy_body_r): Update debug info. (expand_call_inline): Duplicate callee block tree into caller; copy all the unexpanded_var_list. (save_body): Save unexpanded_var_list and blocks. * tree-optimize.c (tree_rest_of_optimization): Restore blocks/unexpanded_var_list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101449 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-optimize.c')
-rw-r--r--gcc/tree-optimize.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index 73744782107..4add52bdf17 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -924,9 +924,13 @@ tree_rest_of_compilation (tree fndecl)
DECL_ARGUMENTS (fndecl) = cfun->saved_args;
cfun->cfg = cfun->saved_cfg;
cfun->eh = cfun->saved_eh;
+ DECL_INITIAL (fndecl) = cfun->saved_blocks;
+ cfun->unexpanded_var_list = cfun->saved_unexpanded_var_list;
cfun->saved_cfg = NULL;
cfun->saved_eh = NULL;
cfun->saved_args = NULL_TREE;
+ cfun->saved_blocks = NULL_TREE;
+ cfun->saved_unexpanded_var_list = NULL_TREE;
cfun->static_chain_decl = cfun->saved_static_chain_decl;
cfun->saved_static_chain_decl = NULL;
/* When not in unit-at-a-time mode, we must preserve out of line copy