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] |
This patch adds support multiples lto_out_decl_states, which is required by the WPA since it writes multiple output files. It has been tested on i686-unknown-linux-gnu and had not new regression. 2008-08-05 Doug Kwan <dougkwan@google.com> * lto-function-out.c (create_output_block): Call lto_init_out_decl_buffer instead of allocating hash-table for local decls itself. (destroy_output_block): Call lto_destroy_out_decl_buffer instead of deallocating local decl hash-table and vector seperately. (output_local_decl_ref): Do not push NAME into local decls vector. (output_local_var_decl): Adjust after moving field local_decls into local_decl_buffer.decls. (output_local_decl): Same. (produce_asm): Same. * lto-tree-out.h (struct output_block): Move fields LOCAL_DECL_HASH_TABLES, NEXT_LOCAL_DECL_INDEX amd LOCAL_DECLS into a lto_out_decl_buffer field LOCAL_DECL_BUFFER. * passes.c (lto-header.h, lto-section-out.h): Include. (ipa_write_summaries_1): Use an lto_out_decl_state for all summary passes. * lto-section-out.c (decl_state_stack): New. (lto_output_decl_index): Change to use an lto_out_decl_buffer as parameter instead of using separate hash-table and pointer to next index. Create hash-table in BUFFER if table is not there. Also push NAME into decl vector in BUFFER if NAME is a new entry. (lto_output_field_decl_index): Adjust for change in lto_output_decl_index. (lto_output_fn_decl_index): Same. (lto_output_namespace_decl_index): Same. (lto_output_var_decl_index): Same. (lto_output_type_decl_index): Same. (lto_output_type_ref_index): Same. (lto_new_out_decl_state): New. (lto_delete_out_decl_state): New. (lto_get_out_decl_state): Return the top of out decl state stack. (lto_push_out_decl_state): New. (lto_pop_out_decl_state): New. (produce_asm_for_decls): Adjust for change in fields of lto_out_decl_state. Leave deallocation of current lto_out_decl_state to caller. * lto-section-out.h (lto_out_decl_buffer): New. (LTO_DECL_STREAM_FIELD_DECL, LTO_DECL_STREAM_FN_DECL, LTO_DECL_STREAM_VAR_DECL, LTO_DECL_STREAM_TYPE_DECL, LTO_DECL_STREAM_NAMESPACE_DECL, LTO_DECL_STREAM_TYPE, LTO_N_DECL_STREAMS): New enums for global stream indices. (lto_out_decl_state): Group all fields into an array of lto_out_decl_buffers. (lto_out_decl_state_ptr): New type used for lto_out_decl_buffer vector type and functions; (lto_init_out_decl_buffer): New inline. (lto_destroy_out_decl_buffer): Same. (lto_output_decl_index): Adjust parameters in prototype. (lto_new_out_decl_state): New prototype. (lto_delete_out_decl_state): Same. (lto_push_out_decl_state): Same. (lto_pop_out_decl_state): Same.
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |