From 2f41ecf538cfb7f3355dc1844345d9d78e0ca56a Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 5 May 2010 12:21:42 +0200 Subject: lto-cgraph.c (output_varpool): Forward declare; work on encoder. * lto-cgraph.c (output_varpool): Forward declare; work on encoder. (lto_varpool_encoder_new, lto_varpool_encoder_delete, lto_varpool_encoder_encode lto_varpool_encoder_lookup, lto_varpool_encoder_deref, lto_varpool_encoder_size, lto_varpool_encoder_encode_initializer_p, lto_set_varpool_encoder_encode_initializer): New functions. (lto_output_cgraph): Take vset parameter too; compute varpool encoder; call output_varpool. (input_varpool_node): Do not always set analyzed. (input_cgraph_1): Return vector of cgraph nodes. (input_varpool_1): Return vector of varpools. (input_cgraph): Free the vectors. * lto-streamer-out.c (lto_output_ts_decl_common_tree_pointers): output only initializers needed. (lto_output): Only call output_cgraph. (produce_asm_for_decls): Call lto_varpool_encoder_delete. * lto-section-out.c (lto_new_out_decl_state): Initialize state->varpool_node_encoder. * lto-streamer.h (lto_varpool_encoder_d): New. (lto_out_decl_state, lto_file_decl_data): Add varpool_node_encoder. (lto_cgraph_encoder_delete, output_cgraph): Update prototype. (lto_varpool_encoder_deref, lto_varpool_encoder_lookup, lto_varpool_encoder_encode, lto_varpool_encoder_delete, lto_varpool_encoder_encode_initializer_p, lto_varpool_encoder_new): Declare. (output_varpool, input_varpool): Remove declarations. * lto.c (lto_1_to_1_map): Partition only needed nodes. From-SVN: r159062 --- gcc/lto/ChangeLog | 4 ++++ gcc/lto/lto.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/lto') diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index c17da3b..72a8028 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2010-05-05 Jan Hubicka + + * lto.c (lto_1_to_1_map): Partition only needed nodes. + 2010-04-30 Jan Hubicka * lto.c (get_filename_for_set): Look for cgraph node and if none found, use diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index d306580..d653b04 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -584,7 +584,7 @@ lto_1_to_1_map (void) for (vnode = varpool_nodes; vnode; vnode = vnode->next) { - if (vnode->alias) + if (vnode->alias || !vnode->needed) continue; slot = pointer_map_contains (vpmap, file_data); if (slot) -- cgit v1.1