OSDN Git Service

* lto-symtab.c (lto_symtab_entry_def) Add vnode.
[pf3gnuchains/gcc-fork.git] / gcc / lto-streamer.h
index c4d66b7..c33feb6 100644 (file)
@@ -1,7 +1,7 @@
 /* Data structures and declarations used for reading and writing
    GIMPLE to a file stream.
 
 /* Data structures and declarations used for reading and writing
    GIMPLE to a file stream.
 
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
    Contributed by Doug Kwan <dougkwan@google.com>
 
 This file is part of GCC.
    Contributed by Doug Kwan <dougkwan@google.com>
 
 This file is part of GCC.
@@ -61,7 +61,7 @@ along with GCC; see the file COPYING3.  If not see
       entry, there is word with the offset within the section to the
       entry.
 
       entry, there is word with the offset within the section to the
       entry.
 
-   7) THE LABEL NAMES.  
+   7) THE LABEL NAMES.
 
       Since most labels do not have names, this section my be of zero
       length.  It consists of an array of string table references, one
 
       Since most labels do not have names, this section my be of zero
       length.  It consists of an array of string table references, one
@@ -70,18 +70,18 @@ along with GCC; see the file COPYING3.  If not see
       the negative ones do not.  The positive index can be used to
       find the name in this array.
 
       the negative ones do not.  The positive index can be used to
       find the name in this array.
 
-   9) THE CFG. 
+   9) THE CFG.
 
    10) Index into the local decls.  Since local decls can have local
       decls inside them, they must be read in randomly in order to
 
    10) Index into the local decls.  Since local decls can have local
       decls inside them, they must be read in randomly in order to
-      properly restore them.  
+      properly restore them.
 
    11-12) GIMPLE FOR THE LOCAL DECLS AND THE FUNCTION BODY.
 
      The gimple consists of a set of records.
 
      THE FUNCTION
 
    11-12) GIMPLE FOR THE LOCAL DECLS AND THE FUNCTION BODY.
 
      The gimple consists of a set of records.
 
      THE FUNCTION
-       
+
      At the top level of (8) is the function. It consists of five
      pieces:
 
      At the top level of (8) is the function. It consists of five
      pieces:
 
@@ -172,7 +172,7 @@ struct bitpack_d
    (GIMPLE statements, basic blocks, EH regions, tree nodes, etc).
 
    NOTE, when adding new LTO tags, also update lto_tag_name.  */
    (GIMPLE statements, basic blocks, EH regions, tree nodes, etc).
 
    NOTE, when adding new LTO tags, also update lto_tag_name.  */
-enum LTO_tags 
+enum LTO_tags
 {
   LTO_null = 0,
 
 {
   LTO_null = 0,
 
@@ -256,10 +256,11 @@ enum lto_section_type
   LTO_section_function_body,
   LTO_section_static_initializer,
   LTO_section_cgraph,
   LTO_section_function_body,
   LTO_section_static_initializer,
   LTO_section_cgraph,
+  LTO_section_varpool,
+  LTO_section_jump_functions,
   LTO_section_ipa_pure_const,
   LTO_section_ipa_reference,
   LTO_section_symtab,
   LTO_section_ipa_pure_const,
   LTO_section_ipa_reference,
   LTO_section_symtab,
-  LTO_section_wpa_fixup,
   LTO_section_opts,
   LTO_N_SECTION_TYPES          /* Must be last.  */
 };
   LTO_section_opts,
   LTO_N_SECTION_TYPES          /* Must be last.  */
 };
@@ -283,7 +284,7 @@ DEF_VEC_ALLOC_I(ld_plugin_symbol_resolution_t, heap);
 
 
 /* Macro to define convenience functions for type and decl streams
 
 
 /* Macro to define convenience functions for type and decl streams
-   in lto_file_decl_data.  */ 
+   in lto_file_decl_data.  */
 #define DEFINE_DECL_STREAM_FUNCS(UPPER_NAME, name) \
 static inline tree \
 lto_file_decl_data_get_ ## name (struct lto_file_decl_data *data, \
 #define DEFINE_DECL_STREAM_FUNCS(UPPER_NAME, name) \
 static inline tree \
 lto_file_decl_data_get_ ## name (struct lto_file_decl_data *data, \
@@ -306,17 +307,17 @@ lto_file_decl_data_num_ ## name ## s (struct lto_file_decl_data *data) \
    or function.  The first parameter is the file data that contains
    the information.  The second parameter is the type of information
    to be obtained.  The third parameter is the name of the function
    or function.  The first parameter is the file data that contains
    the information.  The second parameter is the type of information
    to be obtained.  The third parameter is the name of the function
-   and is only used when finding a function body; otherwise it is 
+   and is only used when finding a function body; otherwise it is
    NULL.  The fourth parameter is the length of the data returned.  */
    NULL.  The fourth parameter is the length of the data returned.  */
-typedef const char* (lto_get_section_data_f) (struct lto_file_decl_data *, 
+typedef const char* (lto_get_section_data_f) (struct lto_file_decl_data *,
                                              enum lto_section_type,
                                              enum lto_section_type,
-                                             const char *, 
+                                             const char *,
                                              size_t *);
 
 /* Return the data found from the above call.  The first three
    parameters are the same as above.  The fourth parameter is the data
    itself and the fifth is the lenght of the data. */
                                              size_t *);
 
 /* Return the data found from the above call.  The first three
    parameters are the same as above.  The fourth parameter is the data
    itself and the fifth is the lenght of the data. */
-typedef void (lto_free_section_data_f) (struct lto_file_decl_data *, 
+typedef void (lto_free_section_data_f) (struct lto_file_decl_data *,
                                        enum lto_section_type,
                                        const char *,
                                        const char *,
                                        enum lto_section_type,
                                        const char *,
                                        const char *,
@@ -356,7 +357,7 @@ struct lto_streamer_cache_d
 
 
 /* Structure used as buffer for reading an LTO file.  */
 
 
 /* Structure used as buffer for reading an LTO file.  */
-struct lto_input_block 
+struct lto_input_block
 {
   const char *data;
   unsigned int p;
 {
   const char *data;
   unsigned int p;
@@ -554,10 +555,6 @@ struct lto_file_decl_data
   /* Nonzero if this file should be recompiled with LTRANS.  */
   unsigned needs_ltrans_p : 1;
 
   /* Nonzero if this file should be recompiled with LTRANS.  */
   unsigned needs_ltrans_p : 1;
 
-  /* If the file is open, this is the fd of the mapped section.  This
-     is -1 if the file has not yet been opened.  */
-  int fd;
-
   /* Hash table maps lto-related section names to location in file.  */
   htab_t section_hash_table;
 
   /* Hash table maps lto-related section names to location in file.  */
   htab_t section_hash_table;
 
@@ -676,7 +673,7 @@ struct data_in
 
   /* Number of named labels.  Used to find the index of unnamed labels
      since they share space with the named labels.  */
 
   /* Number of named labels.  Used to find the index of unnamed labels
      since they share space with the named labels.  */
-  unsigned int num_named_labels;  
+  unsigned int num_named_labels;
 
   /* Number of unnamed labels.  */
   unsigned int num_unnamed_labels;
 
   /* Number of unnamed labels.  */
   unsigned int num_unnamed_labels;
@@ -695,13 +692,13 @@ struct data_in
 
 /* In lto-section-in.c  */
 extern struct lto_input_block * lto_create_simple_input_block (
 
 /* In lto-section-in.c  */
 extern struct lto_input_block * lto_create_simple_input_block (
-                              struct lto_file_decl_data *, 
+                              struct lto_file_decl_data *,
                               enum lto_section_type, const char **, size_t *);
 extern void
                               enum lto_section_type, const char **, size_t *);
 extern void
-lto_destroy_simple_input_block (struct lto_file_decl_data *, 
+lto_destroy_simple_input_block (struct lto_file_decl_data *,
                                enum lto_section_type,
                                struct lto_input_block *, const char *, size_t);
                                enum lto_section_type,
                                struct lto_input_block *, const char *, size_t);
-extern void lto_set_in_hooks (struct lto_file_decl_data **, 
+extern void lto_set_in_hooks (struct lto_file_decl_data **,
                              lto_get_section_data_f *,
                              lto_free_section_data_f *);
 extern struct lto_file_decl_data **lto_get_file_decl_data (void);
                              lto_get_section_data_f *,
                              lto_free_section_data_f *);
 extern struct lto_file_decl_data **lto_get_file_decl_data (void);
@@ -770,10 +767,6 @@ extern void lto_push_out_decl_state (struct lto_out_decl_state *);
 extern struct lto_out_decl_state *lto_pop_out_decl_state (void);
 extern void lto_record_function_out_decl_state (tree,
                                                struct lto_out_decl_state *);
 extern struct lto_out_decl_state *lto_pop_out_decl_state (void);
 extern void lto_record_function_out_decl_state (tree,
                                                struct lto_out_decl_state *);
-extern void lto_new_extern_inline_states (void);
-extern void lto_delete_extern_inline_states (void);
-extern void lto_force_functions_extern_inline (bitmap decls);
-extern bool lto_forced_extern_inline_p (tree fn_decl);
 
 
 /* In lto-streamer.c.  */
 
 
 /* In lto-streamer.c.  */
@@ -806,10 +799,6 @@ extern void lto_check_version (int, int);
 
 
 /* In lto-streamer-in.c */
 
 
 /* In lto-streamer-in.c */
-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_cgraph (struct lto_file_decl_data *, const char *);
 extern void lto_init_reader (void);
 extern tree lto_input_tree (struct lto_input_block *, struct data_in *);
 extern void lto_input_cgraph (struct lto_file_decl_data *, const char *);
 extern void lto_init_reader (void);
 extern tree lto_input_tree (struct lto_input_block *, struct data_in *);
@@ -831,6 +820,7 @@ 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_bitpack (struct lto_output_stream *, struct bitpack_d *);
 extern void destroy_output_block (struct output_block *);
 extern void lto_output_tree (struct output_block *, tree, bool);
 extern void lto_output_bitpack (struct lto_output_stream *, struct bitpack_d *);
+extern void produce_asm (struct output_block *ob, tree fn);
 
 
 /* In lto-cgraph.c  */
 
 
 /* In lto-cgraph.c  */
@@ -841,15 +831,17 @@ int lto_cgraph_encoder_encode (lto_cgraph_encoder_t, struct cgraph_node *);
 void lto_cgraph_encoder_delete (lto_cgraph_encoder_t encoder);
 void output_cgraph (cgraph_node_set);
 void input_cgraph (void);
 void lto_cgraph_encoder_delete (lto_cgraph_encoder_t encoder);
 void output_cgraph (cgraph_node_set);
 void input_cgraph (void);
+void output_varpool (varpool_node_set);
+void input_varpool (void);
 
 
 /* In lto-symtab.c.  */
 extern void lto_symtab_register_decl (tree, ld_plugin_symbol_resolution_t,
                                      struct lto_file_decl_data *);
 extern void lto_symtab_merge_decls (void);
 
 
 /* In lto-symtab.c.  */
 extern void lto_symtab_register_decl (tree, ld_plugin_symbol_resolution_t,
                                      struct lto_file_decl_data *);
 extern void lto_symtab_merge_decls (void);
+extern void lto_symtab_merge_cgraph_nodes (void);
 extern tree lto_symtab_prevailing_decl (tree decl);
 extern enum ld_plugin_symbol_resolution lto_symtab_get_resolution (tree decl);
 extern tree lto_symtab_prevailing_decl (tree decl);
 extern enum ld_plugin_symbol_resolution lto_symtab_get_resolution (tree decl);
-extern void lto_symtab_clear_resolution (tree decl);
 
 
 /* In lto-opts.c.  */
 
 
 /* In lto-opts.c.  */