diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-12 00:14:19 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-03-12 00:14:19 +0000 |
commit | e9e2b82fdee5d6a66686412b6c5c4a02dbb76429 (patch) | |
tree | 9f5abb5d1ef41104ac985a833791fcc67420ed66 /gcc/cgraph.c | |
parent | 312da1e0c113a4ce2aac92e73af1ee8e09d45879 (diff) | |
download | gcc-e9e2b82fdee5d6a66686412b6c5c4a02dbb76429.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 5ca19015a3d..ede58bf5aaf 100644 --- a/gcc/cgraph.c +++ b/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_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); |