* cgraph.c (cgraph_node::release_body): Free function_in_decl_state.
(cgraph_node::remove): Likewise.
(cgraph_node::get_untransformed_body): Likewise.
* varpool.c (varpool_node::remove): Likewise.
(varpool_node::get_constructor): Add sanity check.
* lto.c (read_cgraph_and_symbols): Do not do merging
at ltrans stage.
From-SVN: r221366
+2015-03-10 Jan Hubicka <hubicka@ucw.cz>
+
+ * cgraph.c (cgraph_node::release_body): Free function_in_decl_state.
+ (cgraph_node::remove): Likewise.
+ (cgraph_node::get_untransformed_body): Likewise.
+ * varpool.c (varpool_node::remove): Likewise.
+ (varpool_node::get_constructor): Add sanity check.
+
2015-03-11 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi (-fgnu89-inline): Remove discussion about
DECL_INITIAL (decl) = error_mark_node;
release_function_body (decl);
if (lto_file_data)
- lto_free_function_in_decl_state_for_node (this);
+ {
+ lto_free_function_in_decl_state_for_node (this);
+ lto_file_data = NULL;
+ }
}
/* Remove function from symbol table. */
n = cgraph_node::get (decl);
if (!n
|| (!n->clones && !n->clone_of && !n->global.inlined_to
- && (symtab->global_info_ready
+ && ((symtab->global_info_ready || in_lto_p)
&& (TREE_ASM_WRITTEN (n->decl)
|| DECL_EXTERNAL (n->decl)
|| !n->analyzed
|| (!flag_wpa && n->in_other_partition)))))
release_body ();
}
+ else
+ {
+ lto_free_function_in_decl_state_for_node (this);
+ lto_file_data = NULL;
+ }
decl = NULL;
if (call_site_hash)
lto_free_section_data (file_data, LTO_section_function_body, name,
data, len);
lto_free_function_in_decl_state_for_node (this);
+ /* Keep lto file data so ipa-inline-analysis knows about cross module
+ inlining. */
timevar_pop (TV_IPA_LTO_GIMPLE_IN);
+2015-03-10 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto.c (read_cgraph_and_symbols): Do not do merging
+ at ltrans stage.
+
2015-02-26 Jakub Jelinek <jakub@redhat.com>
* lto.c (lto_mode_identity_table): New variable.
fprintf (symtab->dump_file, "Before merging:\n");
symtab_node::dump_table (symtab->dump_file);
}
- lto_symtab_merge_symbols ();
- /* Removal of unreachable symbols is needed to make verify_symtab to pass;
- we are still having duplicated comdat groups containing local statics.
- We could also just remove them while merging. */
- symtab->remove_unreachable_nodes (dump_file);
+ if (!flag_ltrans)
+ {
+ lto_symtab_merge_symbols ();
+ /* Removal of unreachable symbols is needed to make verify_symtab to pass;
+ we are still having duplicated comdat groups containing local statics.
+ We could also just remove them while merging. */
+ symtab->remove_unreachable_nodes (dump_file);
+ }
ggc_collect ();
symtab->state = IPA_SSA;
+ /* FIXME: Technically all node removals happening here are useless, because
+ WPA should not stream them. */
+ if (flag_ltrans)
+ symtab->remove_unreachable_nodes (dump_file);
timevar_pop (TV_IPA_LTO_CGRAPH_MERGE);
varpool_node::remove (void)
{
symtab->call_varpool_removal_hooks (this);
+ if (lto_file_data)
+ {
+ lto_free_function_in_decl_state_for_node (this);
+ lto_file_data = NULL;
+ }
/* When streaming we can have multiple nodes associated with decl. */
if (symtab->state == LTO_STREAMING)
name);
lto_input_variable_constructor (file_data, this, data);
+ gcc_assert (DECL_INITIAL (decl) != error_mark_node);
lto_stats.num_function_bodies++;
lto_free_section_data (file_data, LTO_section_function_body, name,
data, len);