diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-13 12:09:46 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-13 12:09:46 +0000 |
commit | 547ca3bd8e3409e0a796c9daace21b8fb981e866 (patch) | |
tree | 1c2ac6570bbc8b01a80d59c4395f5f5e708ea6d0 /gcc/lto-streamer-in.c | |
parent | ca92a39fb16598b71a90ed2be2c3543dd079e66c (diff) | |
download | gcc-547ca3bd8e3409e0a796c9daace21b8fb981e866.tar.gz |
2009-11-13 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 154145
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@154146 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r-- | gcc/lto-streamer-in.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index f7c793647bc..59784a42f63 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1261,6 +1261,8 @@ input_function (tree fn_decl, struct data_in *data_in, gimple *stmts; basic_block bb; struct bitpack_d *bp; + struct cgraph_node *node; + tree args, narg, oarg; fn = DECL_STRUCT_FUNCTION (fn_decl); tag = input_record_start (ib); @@ -1295,6 +1297,22 @@ input_function (tree fn_decl, struct data_in *data_in, /* Read all the local symbols. */ fn->local_decls = lto_input_tree (ib, data_in); + /* Read all function arguments. We need to re-map them here to the + arguments of the merged function declaration. */ + args = lto_input_tree (ib, data_in); + for (oarg = args, narg = DECL_ARGUMENTS (fn_decl); + oarg && narg; + oarg = TREE_CHAIN (oarg), narg = TREE_CHAIN (narg)) + { + int ix; + bool res; + res = lto_streamer_cache_lookup (data_in->reader_cache, oarg, &ix); + gcc_assert (res); + /* Replace the argument in the streamer cache. */ + lto_streamer_cache_insert_at (data_in->reader_cache, narg, ix); + } + gcc_assert (!oarg && !narg); + /* Read all the SSA names. */ input_ssa_names (ib, data_in, fn); @@ -1306,9 +1324,6 @@ input_function (tree fn_decl, struct data_in *data_in, gcc_assert (DECL_INITIAL (fn_decl)); DECL_SAVED_TREE (fn_decl) = NULL_TREE; - /* Read all function arguments. */ - DECL_ARGUMENTS (fn_decl) = lto_input_tree (ib, data_in); - /* Read all the basic blocks. */ tag = input_record_start (ib); while (tag) @@ -1340,7 +1355,9 @@ input_function (tree fn_decl, struct data_in *data_in, gimple_set_body (fn_decl, bb_seq (ei_edge (ei)->dest)); } - fixup_call_stmt_edges (cgraph_node (fn_decl), stmts); + node = cgraph_node (fn_decl); + fixup_call_stmt_edges (node, stmts); + execute_all_ipa_stmt_fixups (node, stmts); update_ssa (TODO_update_ssa_only_virtuals); free_dominance_info (CDI_DOMINATORS); |