Commit 510873f9 by Jan Hubicka Committed by Jan Hubicka

lto-streamer-in.c (input_function): Add node parameter.


	* lto-streamer-in.c (input_function): Add node parameter.
	(lto_read_body_or_constructor): Use it.

From-SVN: r279379
parent 26b74ed0
2019-12-13 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-in.c (input_function): Add node parameter.
(lto_read_body_or_constructor): Use it.
2019-12-13 Roman Zhuykov <zhroma@ispras.ru> 2019-12-13 Roman Zhuykov <zhroma@ispras.ru>
PR rtl-optimization/92591 PR rtl-optimization/92591
...@@ -1022,13 +1022,13 @@ input_struct_function_base (struct function *fn, class data_in *data_in, ...@@ -1022,13 +1022,13 @@ input_struct_function_base (struct function *fn, class data_in *data_in,
static void static void
input_function (tree fn_decl, class data_in *data_in, input_function (tree fn_decl, class data_in *data_in,
class lto_input_block *ib, class lto_input_block *ib_cfg) class lto_input_block *ib, class lto_input_block *ib_cfg,
cgraph_node *node)
{ {
struct function *fn; struct function *fn;
enum LTO_tags tag; enum LTO_tags tag;
gimple **stmts; gimple **stmts;
basic_block bb; basic_block bb;
struct cgraph_node *node;
tag = streamer_read_record_start (ib); tag = streamer_read_record_start (ib);
lto_tag_check (tag, LTO_function); lto_tag_check (tag, LTO_function);
...@@ -1064,9 +1064,6 @@ input_function (tree fn_decl, class data_in *data_in, ...@@ -1064,9 +1064,6 @@ input_function (tree fn_decl, class data_in *data_in,
gimple_register_cfg_hooks (); gimple_register_cfg_hooks ();
node = cgraph_node::get (fn_decl);
if (!node)
node = cgraph_node::create (fn_decl);
input_struct_function_base (fn, data_in, ib); input_struct_function_base (fn, data_in, ib);
input_cfg (ib_cfg, data_in, fn); input_cfg (ib_cfg, data_in, fn);
...@@ -1293,7 +1290,8 @@ lto_read_body_or_constructor (struct lto_file_decl_data *file_data, struct symta ...@@ -1293,7 +1290,8 @@ lto_read_body_or_constructor (struct lto_file_decl_data *file_data, struct symta
{ {
lto_input_block ib_cfg (data + cfg_offset, header->cfg_size, lto_input_block ib_cfg (data + cfg_offset, header->cfg_size,
file_data->mode_table); file_data->mode_table);
input_function (fn_decl, data_in, &ib_main, &ib_cfg); input_function (fn_decl, data_in, &ib_main, &ib_cfg,
dyn_cast <cgraph_node *>(node));
} }
else else
input_constructor (fn_decl, data_in, &ib_main); input_constructor (fn_decl, data_in, &ib_main);
......
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