aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-in.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-11-23 16:52:36 +0100
committerJan Hubicka <jh@suse.cz>2020-11-23 16:53:25 +0100
commit54af3008b6f05985d378a48d337d9c70c708ecff (patch)
treec31e53f785aa5d8c97068be67ec8e3cce2c9a655 /gcc/lto-streamer-in.c
parent204b61b906f2f806eec2f7bb72d4dd79c88d688a (diff)
downloadgcc-54af3008b6f05985d378a48d337d9c70c708ecff.zip
gcc-54af3008b6f05985d378a48d337d9c70c708ecff.tar.gz
gcc-54af3008b6f05985d378a48d337d9c70c708ecff.tar.bz2
Do not leak SSANAMES in lto streamer
* lto-streamer-in.c (input_cfg): Do not init ssa operands. (input_function): Do not init tree_ssa and set in_ssa_p. (input_ssa_names): Do it here. * tree-ssa.c (init_tree_ssa): Add additional SIZE parameter, default to 0 * tree-ssanames.c (init_ssanames): Do not round size up to 50, allocate precisely. * tree-ssa.h (init_tree_ssa): Update prototype.
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r--gcc/lto-streamer-in.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 64037f7..a20d64b 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1017,7 +1017,6 @@ input_cfg (class lto_input_block *ib, class data_in *data_in,
int index;
init_empty_tree_cfg_for_function (fn);
- init_ssa_operands (fn);
profile_status_for_fn (fn) = streamer_read_enum (ib, profile_status_d,
PROFILE_LAST);
@@ -1144,7 +1143,9 @@ input_ssa_names (class lto_input_block *ib, class data_in *data_in,
unsigned int i, size;
size = streamer_read_uhwi (ib);
- init_ssanames (fn, size);
+ init_tree_ssa (fn, size);
+ cfun->gimple_df->in_ssa_p = true;
+ init_ssa_operands (fn);
i = streamer_read_uhwi (ib);
while (i)
@@ -1384,9 +1385,6 @@ input_function (tree fn_decl, class data_in *data_in,
push_struct_function (fn_decl);
fn = DECL_STRUCT_FUNCTION (fn_decl);
- init_tree_ssa (fn);
- /* We input IL in SSA form. */
- cfun->gimple_df->in_ssa_p = true;
gimple_register_cfg_hooks ();