> This patch replaces symtab_node with toplevel_node in lto_symtab_encoder > and modifies all places where lto_symtab_encoder is used to handle > (ignore) asm_node. > > gcc/ChangeLog: > > * ipa-icf.cc (sem_item_optimizer::write_summary): Use > toplevel_node. > (sem_item_optimizer::read_section): Likewise. > * ipa-modref.cc (modref_write): Likewise. > * ipa-prop.cc (ipa_write_return_summaries): Likewise. > (ipcp_write_transformation_summaries): Likewise. > * ipa-reference.cc (ipa_reference_write_optimization_summary): > Likewise. > * lto-cgraph.cc (lto_symtab_encoder_new): Likewise. > (lto_symtab_encoder_encode): Likewise. > (lto_symtab_encoder_delete_node): Likewise. > (lto_symtab_encoder_in_partition_p): Likewise. > (lto_set_symtab_encoder_in_partition): Likewise. > (output_refs): Likewise. > (compute_ltrans_boundary): Likewise. > (output_symtab): Likewise. > (output_cgraph_opt_summary): Likewise. > * lto-streamer-out.cc (lto_output): Likewise. > (produce_symtab): Likewise. > (produce_symtab_extension): Likewise. > * lto-streamer.h (struct lto_encoder_entry): Likewise. > (struct lto_symtab_encoder_d): Likewise. > (lto_symtab_encoder_encode): Likewise. > (lto_symtab_encoder_delete_node): Likewise. > (lto_symtab_encoder_in_partition_p): Likewise. > (lto_symtab_encoder_lookup): Likewise. > (lsei_next): Likewise. > (lsei_varpool_node): Likewise. > > gcc/lto/ChangeLog: > > * lto-partition.cc (add_symbol_to_partition): Use toplevel_node. > (undo_partition): Likewise. > (join_partitions): Likewise. > (split_partition_into_nodes): Likewise. > (is_partition_reorder): Likewise. > (lto_balanced_map): Likewise. > (lto_promote_cross_file_statics): Likewise. > * lto.cc (lto_wpa_write_files): Likewise. OK, thanks.
Another plan which I have in my TODo for very long time is to add some infrastructure for writting/reading summaries that does need to interact that much with the API for sections/encoders and cleanup the API as a followup. All the write/read functions of IPA pases are kind of copy&paste of each other and share coniderable amount of stuff. Honza
