+2019-10-12 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto-common.c (read_cgraph_and_symbols): Grow ggc memory use after
+ summary streaming.
+
2019-10-12 Jan Hubicka <hubicka@ucw.cz>
* lto.c (lto_wpa_write_files): Do not update bodies of clones.
/* At this stage we know that majority of GGC memory is reachable.
Growing the limits prevents unnecesary invocation of GGC. */
ggc_grow ();
- ggc_collect ();
/* Set the hooks so that all of the ipa passes can read in their data. */
lto_set_in_hooks (all_file_decl_data, get_section_data, free_section_data);
if (tree_with_vars)
ggc_free (tree_with_vars);
tree_with_vars = NULL;
- ggc_collect ();
+ /* During WPA we want to prevent ggc collecting by default. Grow limits
+ until after the IPA summaries are streamed in. Basically all IPA memory
+ is explcitly managed by ggc_free and ggc collect is not useful.
+ Exception are the merged declarations. */
+ ggc_grow ();
timevar_pop (TV_IPA_LTO_DECL_MERGE);
/* Each pass will set the appropriate timer. */
else
ipa_read_summaries ();
+ ggc_grow ();
+
for (i = 0; all_file_decl_data[i]; i++)
{
gcc_assert (all_file_decl_data[i]->symtab_node_encoder);