aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-12-13 19:43:20 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-12-13 18:43:20 +0000
commit510873f901ffa34391b4b744c939e6ac33d1e663 (patch)
tree9ba13d1d0b439ad2ed851344c144a0550c4465ba
parent26b74ed0223d108d7d7818c3c860f20cfe81a4af (diff)
downloadgcc-510873f901ffa34391b4b744c939e6ac33d1e663.zip
gcc-510873f901ffa34391b4b744c939e6ac33d1e663.tar.gz
gcc-510873f901ffa34391b4b744c939e6ac33d1e663.tar.bz2
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/lto-streamer-in.c10
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f8a56a4..06b9444 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR rtl-optimization/92591
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 128d764..675e1a7 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1022,13 +1022,13 @@ input_struct_function_base (struct function *fn, class data_in *data_in,
static void
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;
enum LTO_tags tag;
gimple **stmts;
basic_block bb;
- struct cgraph_node *node;
tag = streamer_read_record_start (ib);
lto_tag_check (tag, LTO_function);
@@ -1064,9 +1064,6 @@ input_function (tree fn_decl, class data_in *data_in,
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_cfg (ib_cfg, data_in, fn);
@@ -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,
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
input_constructor (fn_decl, data_in, &ib_main);