Commit 6cd174f6 by Jan Hubicka Committed by Jan Hubicka

* lto-stramer-out.c (produce_asm_for_decls): Correct accidentally commited change.

From-SVN: r159234
parent 5c4f225f
2010-05-10 Jan Hubicka <jh@suse.cz> 2010-05-10 Jan Hubicka <jh@suse.cz>
* lto-stramer-out.c (produce_asm_for_decls): Correct accidentally commited change.
2010-05-10 Jan Hubicka <jh@suse.cz>
* passes.c (ipa_write_summaries_1, ipa_write_optimization_summaries): Allocate * passes.c (ipa_write_summaries_1, ipa_write_optimization_summaries): Allocate
encoders. encoders.
* lto-section-out.c (lto_new_out_decl_state): Do not allocate it here. * lto-section-out.c (lto_new_out_decl_state): Do not allocate it here.
......
...@@ -2505,7 +2505,6 @@ produce_asm_for_decls (cgraph_node_set set, varpool_node_set vset) ...@@ -2505,7 +2505,6 @@ produce_asm_for_decls (cgraph_node_set set, varpool_node_set vset)
fn_out_state = fn_out_state =
VEC_index (lto_out_decl_state_ptr, lto_function_decl_states, idx); VEC_index (lto_out_decl_state_ptr, lto_function_decl_states, idx);
lto_output_decl_state_refs (ob, decl_state_stream, fn_out_state); lto_output_decl_state_refs (ob, decl_state_stream, fn_out_state);
lto_delete_out_decl_state (fn_out_state);
} }
lto_write_stream (decl_state_stream); lto_write_stream (decl_state_stream);
free(decl_state_stream); free(decl_state_stream);
...@@ -2522,6 +2521,12 @@ produce_asm_for_decls (cgraph_node_set set, varpool_node_set vset) ...@@ -2522,6 +2521,12 @@ produce_asm_for_decls (cgraph_node_set set, varpool_node_set vset)
lto_write_options (); lto_write_options ();
/* Deallocate memory and clean up. */ /* Deallocate memory and clean up. */
for (idx = 0; idx < num_fns; idx++)
{
fn_out_state =
VEC_index (lto_out_decl_state_ptr, lto_function_decl_states, idx);
lto_delete_out_decl_state (fn_out_state);
}
lto_cgraph_encoder_delete (ob->decl_state->cgraph_node_encoder); lto_cgraph_encoder_delete (ob->decl_state->cgraph_node_encoder);
lto_varpool_encoder_delete (ob->decl_state->varpool_node_encoder); lto_varpool_encoder_delete (ob->decl_state->varpool_node_encoder);
VEC_free (lto_out_decl_state_ptr, heap, lto_function_decl_states); VEC_free (lto_out_decl_state_ptr, heap, lto_function_decl_states);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment