From 4843f03206f7ee188c5f7368ec6e64da7e90a396 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 31 Aug 2013 15:44:46 +0200 Subject: cgraph.c (cgraph_get_body): Update call of lto_input_function_body. * cgraph.c (cgraph_get_body): Update call of lto_input_function_body. * gimple-streamer-in.c (input_gimple_stmt): Move sanity check to ... * ipa-utils.c: Include lto-streamer.h, ipa-inline.h (ipa_merge_profiles): New function. * lto-streamer-in.c (lto_read_body): Take node instead of fn_decl. (lto_input_function_body): Likewise. From-SVN: r202130 --- gcc/lto-streamer-in.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gcc/lto-streamer-in.c') diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 6430359..f1d5935 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1001,14 +1001,14 @@ input_function (tree fn_decl, struct data_in *data_in, } -/* Read the body from DATA for function FN_DECL and fill it in. +/* Read the body from DATA for function NODE and fill it in. FILE_DATA are the global decls and types. SECTION_TYPE is either LTO_section_function_body or LTO_section_static_initializer. If section type is LTO_section_function_body, FN must be the decl for that function. */ static void -lto_read_body (struct lto_file_decl_data *file_data, tree fn_decl, +lto_read_body (struct lto_file_decl_data *file_data, struct cgraph_node *node, const char *data, enum lto_section_type section_type) { const struct lto_function_header *header; @@ -1018,6 +1018,7 @@ lto_read_body (struct lto_file_decl_data *file_data, tree fn_decl, int string_offset; struct lto_input_block ib_cfg; struct lto_input_block ib_main; + tree fn_decl = node->symbol.decl; header = (const struct lto_function_header *) data; cfg_offset = sizeof (struct lto_function_header); @@ -1044,7 +1045,6 @@ lto_read_body (struct lto_file_decl_data *file_data, tree fn_decl, if (section_type == LTO_section_function_body) { struct lto_in_decl_state *decl_state; - struct cgraph_node *node = cgraph_get_node (fn_decl); unsigned from; gcc_checking_assert (node); @@ -1094,14 +1094,14 @@ lto_read_body (struct lto_file_decl_data *file_data, tree fn_decl, } -/* Read the body of FN_DECL using DATA. FILE_DATA holds the global +/* Read the body of NODE using DATA. FILE_DATA holds the global decls and types. */ void lto_input_function_body (struct lto_file_decl_data *file_data, - tree fn_decl, const char *data) + struct cgraph_node *node, const char *data) { - lto_read_body (file_data, fn_decl, data, LTO_section_function_body); + lto_read_body (file_data, node, data, LTO_section_function_body); } -- cgit v1.1