This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Merge varpool and cgraph encoders into symtab encoders


On Fri, Aug 10, 2012 at 8:56 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch does the boring job of merging varpool and cgraph encoders into
> single symtab encoder.  This has some snowballing effect. Because the IDs of
> cgraphs and varpools now use single space, the cgraph and varpool sections
> needs to be merged. Also reference lists output code is simplified.  The
> uses of encoders needs to be updated to expect all kinds of symtab nodes in
> the encoder lists.
>
> I broke out all subsequent changes from this renaming happy patch to make them
> more readable.
>
> Bootstrapped/regtested x86_64-linux and tested with Mozilla build. I will
> commit it after bit of further testing. The mozilla binarry differs (due to
> different UIDs) but has same size.
>
> Honza
>
>         * cgraph.h (vector types for symtab_node): Add.
>         * ipa-reference.c (ipa_reference_write_optimization_summary): Update
>         for new symtab encoder.
>         (ipa_reference_read_optimization_summary): Likewise.
>         * lto-cgraph.c (output_varpool): Remove.
>         (input_cgraph_opt_summary): Take symtab nodes vector as argument.
>         (LTO_cgraph_tags): Rename to ...
>         (LTO_symtab_tags): ... this one; add LTO_symtab_variable.
>         (lto_cgraph_encoder_new): Rename to ...
>         (lto_symtab_encoder_new): ... this on.
>         (lto_cgraph_encoder_encode): Rename to ...
>         (lto_symtab_encoder_encode): ... this one.
>         (lto_cgraph_encoder_delete): Rename to ...
>         (lto_symtab_encoder_delete): ... this one.
>         (lto_cgraph_encoder_deref): Rename to ...
>         (lto_symtab_encoder_deref): ... this one.
>         (lto_cgraph_encoder_encode_body_p): Rename to ...
>         (lto_symtab_encoder_encode_body_p): ... this one.
>         (lto_varpool_encoder_new, lto_varpool_encoder_delete,
>         lto_varpool_encoder_encode, lto_varpool_encoder_lookup,
>         lto_varpool_encoder_deref): Remove.
>         (lto_varpool_encoder_encode_initializer_p): Rename to ...
>         (lto_symtab_encoder_encode_initializer_p): ... this one.
>         (lto_set_varpool_encoder_encode_initializer): Rename to ...
>         (lto_set_symtab_encoder_encode_initializer): ... this one.
>         (lto_output_edge): Update.
>         (lto_output_node): Update.
>         (lto_output_varpool_node): Update; stream out LTO_symtab_variable tag.
>         (lto_output_ref): Drop varpool_encoder; update.
>         (add_node_to): Update.
>         (add_references): Update.
>         (output_outgoing_cgraph_edges): Update.
>         (output_refs): Update.
>         (compute_ltrans_boundary): Update.
>         (output_cgraph): Update; output varpools too.
>         (input_overwrite_node): Update.
>         (output_varpool): Remove.
>         (input_node): Update.
>         (input_ref): Update.
>         (input_edge): Update.
>         (input_cgraph_1): Update; input varpool too; unify fixup code.
>         (input_varpool_1): Remove.
>         (input_refs): Update.
>         (input_cgraph): Update.
>         (output_node_opt_summary): Update.
>         (input_cgraph_opt_section): Update.
>         (input_cgraph_opt_summary): Update.
>         * ipa-pure-const.c (pure_const_write_summary): Update.
>         (pure_const_read_summary): Update.
>         * lto-streamer-out.c (lto_write_tree): Update.
>         (lto_output): Likewise.
>         (produce_symtab): Update.
>         (produce_asm_for_decls): Update.
>         * ipa-inline-analysis.c (inline_read_section): Update.
>         (inline_write_summary): Update.
>         * ipa-prop.c (ipa_write_node_info): Update.
>         (ipa_prop_read_section): Update.
>         * lto-streamer.h (lto_cgraph_encoder_d): Rename to ...
>         (lto_symtab_encoder_d): ... this one;  add initializer.
>         (lto_cgraph_encoder_t): Rename to ...
>         (lto_symtab_encoder_t): ... this one.
>         (lto_cgraph_encoder_size): Rename to ...
>         (lto_symtab_encoder_size): ... this one.
>         (lto_varpool_encoder_d): ... remove.
>         (lto_varpool_encoder_t): Remove.
>         (lto_out_decl_state): Remove cgraph_node_encoder, varpool_node_encoder
>         add symtab_node_encoder.
>         (lto_file_decl_data): Likewise.
>         (lto_cgraph_encoder_deref, lto_cgraph_encoder_lookup,
>         lto_cgraph_encoder_new, lto_cgraph_encoder_encode, lto_cgraph_encoder_delete,
>         lto_cgraph_encoder_encode_body_p, lto_varpool_encoder_encode_body_p,
>         lto_varpool_encoder_deref, lto_varpool_encoder_lookup, lto_varpool_encoder_new,
>         lto_varpool_encoder_encode, lto_varpool_encoder_delete,
>         lto_varpool_encoder_encode_initializer_p): Remove.
>         (lto_symtab_encoder_deref, lto_symtab_encoder_lookup,
>         lto_symtab_encoder_t, lto_symtab_encoder_encode, lto_symtab_encoder_delete,
>         lto_symtab_encoder_encode_body_p, lto_symtab_encoder_encode_initializer_p):
>         New.

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54229

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]