diff options
author | jbeulich <jbeulich@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-30 14:56:01 +0000 |
---|---|---|
committer | jbeulich <jbeulich@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-30 14:56:01 +0000 |
commit | 65d1b157e98fd9f131bb9021f5d1d29f335ffaa0 (patch) | |
tree | 088e41e292b4cc3059b11b7ac23f10733b2a3912 /gcc/lto-streamer.h | |
parent | b0f8644ae1e21356df6911537e5f0f0a376d963b (diff) | |
download | gcc-65d1b157e98fd9f131bb9021f5d1d29f335ffaa0.tar.gz |
Split out LTO's writing of top level asm nodes in preparation of extending
what needs to be written out when top level asm-s get enhanced to accept a
limited set of input operands.
gcc/
2011-09-30 Jan Beulich <jbeulich@suse.com>
* lto-cgraph.c (output_cgraph): Remove processing of
'cgraph_asm_nodes', call lto_output_toplevel_asms() instead.
(input_cgraph_1): Remove loop calling cgraph_add_asm_node(), call
lto_input_toplevel_asms() instead.
* lto-section-in.c (lto_section_name): Add "asm" entry.
* lto-streamer-in.c (lto_input_toplevel_asms): New.
* lto-streamer-out.c (lto_output_toplevel_asms): New.
* lto-streamer.h (LTO_minor_version): Bump.
(enum lto_section_type): Add LTO_section_asm.
(struct lto_asm_header): New.
(lto_input_toplevel_asms, lto_output_toplevel_asms): Declare.
* tree-streamer.h (streamer_write_string_cst): Declare.
* tree-streamer-out.c (write_string_cst): Rename to
streamer_write_string_cst and make global. Handle incoming string
being NULL.
(streamer_write_tree_header): Adjust call to renamed function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179386 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer.h')
-rw-r--r-- | gcc/lto-streamer.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index 2564bd2ec21..ee818429328 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -142,7 +142,7 @@ along with GCC; see the file COPYING3. If not see #define LTO_SECTION_NAME_PREFIX ".gnu.lto_" #define LTO_major_version 2 -#define LTO_minor_version 0 +#define LTO_minor_version 1 typedef unsigned char lto_decl_flags_t; @@ -238,6 +238,7 @@ enum lto_section_type LTO_section_cgraph, LTO_section_varpool, LTO_section_refs, + LTO_section_asm, LTO_section_jump_functions, LTO_section_ipa_pure_const, LTO_section_ipa_reference, @@ -387,6 +388,23 @@ struct lto_decl_header }; +/* Structure describing top level asm()s. */ +struct lto_asm_header +{ + /* The header for all types of sections. */ + struct lto_header lto_header; + + /* Size compressed or 0 if not compressed. */ + int32_t compressed_size; + + /* Size of region for expressions, decls, types, etc. */ + int32_t main_size; + + /* Size of the string table. */ + int32_t string_size; +}; + + /* Statistics gathered during LTO, WPA and LTRANS. */ struct lto_stats_d { @@ -789,6 +807,7 @@ extern void lto_input_function_body (struct lto_file_decl_data *, tree, const char *); extern void lto_input_constructors_and_inits (struct lto_file_decl_data *, const char *); +extern void lto_input_toplevel_asms (struct lto_file_decl_data *); extern struct data_in *lto_data_in_create (struct lto_file_decl_data *, const char *, unsigned, VEC(ld_plugin_symbol_resolution_t,heap) *); @@ -807,6 +826,7 @@ extern void lto_register_decl_definition (tree, struct lto_file_decl_data *); extern struct output_block *create_output_block (enum lto_section_type); extern void destroy_output_block (struct output_block *); extern void lto_output_tree (struct output_block *, tree, bool); +extern void lto_output_toplevel_asms (void); extern void produce_asm (struct output_block *ob, tree fn); void lto_output_decl_state_streams (struct output_block *, struct lto_out_decl_state *); |