mirror of git://gcc.gnu.org/git/gcc.git
cgraph.c (cgraph_node::release_body): Free function_in_decl_state.
* 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
This commit is contained in:
parent
8648c55f3b
commit
1c4db82923
|
|
@ -1,3 +1,11 @@
|
|||
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
|
||||
|
|
|
|||
12
gcc/cgraph.c
12
gcc/cgraph.c
|
|
@ -1721,7 +1721,10 @@ cgraph_node::release_body (bool keep_arguments)
|
|||
DECL_INITIAL (decl) = error_mark_node;
|
||||
release_function_body (decl);
|
||||
if (lto_file_data)
|
||||
{
|
||||
lto_free_function_in_decl_state_for_node (this);
|
||||
lto_file_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove function from symbol table. */
|
||||
|
|
@ -1799,13 +1802,18 @@ cgraph_node::remove (void)
|
|||
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)
|
||||
|
|
@ -3218,6 +3226,8 @@ cgraph_node::get_untransformed_body (void)
|
|||
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);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
|||
|
|
@ -3118,13 +3118,20 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
|
|||
fprintf (symtab->dump_file, "Before merging:\n");
|
||||
symtab_node::dump_table (symtab->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);
|
||||
|
||||
|
|
|
|||
|
|
@ -195,6 +195,11 @@ void
|
|||
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)
|
||||
|
|
@ -323,6 +328,7 @@ varpool_node::get_constructor (void)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue