OSDN Git Service

* gcc.dg/pr48235.c: Add dg-require-effective-target freorder.
[pf3gnuchains/gcc-fork.git] / gcc / lto-streamer.h
index e082ffe..5d1f15a 100644 (file)
@@ -1,7 +1,7 @@
 /* Data structures and declarations used for reading and writing
    GIMPLE to a file stream.
 
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
    Contributed by Doug Kwan <dougkwan@google.com>
 
 This file is part of GCC.
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "vec.h"
 #include "vecprim.h"
 #include "alloc-pool.h"
+#include "gcov-io.h"
 
 /* Define when debugging the LTO streamer.  This causes the writer
    to output the numeric value for the memory address of the tree node
@@ -139,7 +140,7 @@ along with GCC; see the file COPYING3.  If not see
    sections a '.' and the section type are appended.  */
 #define LTO_SECTION_NAME_PREFIX         ".gnu.lto_"
 
-#define LTO_major_version 1
+#define LTO_major_version 2
 #define LTO_minor_version 0
 
 typedef unsigned char  lto_decl_flags_t;
@@ -263,6 +264,7 @@ enum lto_section_type
   LTO_section_symtab,
   LTO_section_opts,
   LTO_section_cgraph_opt_sum,
+  LTO_section_inline_summary,
   LTO_N_SECTION_TYPES          /* Must be last.  */
 };
 
@@ -349,14 +351,8 @@ struct lto_streamer_cache_d
   /* Node map to store entries into.  */
   alloc_pool node_map_entries;
 
-  /* Next available slot in the nodes and offsets arrays.  */
-  unsigned next_slot;
-
   /* The nodes pickled so far.  */
   VEC(tree,heap) *nodes;
-
-  /* Offset into the stream where the nodes have been written.  */
-  VEC(unsigned,heap) *offsets;
 };
 
 
@@ -610,6 +606,8 @@ struct GTY(()) lto_file_decl_data
 
   /* Symbol resolutions for this file */
   VEC(ld_plugin_symbol_resolution_t,heap) * GTY((skip)) resolutions;
+
+  struct gcov_ctr_summary GTY((skip)) profile_info;
 };
 
 typedef struct lto_file_decl_data *lto_file_decl_data_ptr;
@@ -828,12 +826,13 @@ extern void lto_bitmap_free (bitmap);
 extern char *lto_get_section_name (int, const char *, struct lto_file_decl_data *);
 extern void print_lto_report (void);
 extern bool lto_streamer_cache_insert (struct lto_streamer_cache_d *, tree,
-                                      int *, unsigned *);
+                                      unsigned *);
 extern bool lto_streamer_cache_insert_at (struct lto_streamer_cache_d *, tree,
-                                         int);
+                                         unsigned);
+extern void lto_streamer_cache_append (struct lto_streamer_cache_d *, tree);
 extern bool lto_streamer_cache_lookup (struct lto_streamer_cache_d *, tree,
-                                      int *);
-extern tree lto_streamer_cache_get (struct lto_streamer_cache_d *, int);
+                                      unsigned *);
+extern tree lto_streamer_cache_get (struct lto_streamer_cache_d *, unsigned);
 extern struct lto_streamer_cache_d *lto_streamer_cache_create (void);
 extern void lto_streamer_cache_delete (struct lto_streamer_cache_d *);
 extern void lto_streamer_init (void);
@@ -859,6 +858,9 @@ extern struct data_in *lto_data_in_create (struct lto_file_decl_data *,
                                    const char *, unsigned,
                                    VEC(ld_plugin_symbol_resolution_t,heap) *);
 extern void lto_data_in_delete (struct data_in *);
+extern const char *lto_input_string (struct data_in *,
+                                    struct lto_input_block *);
+extern void lto_input_data_block (struct lto_input_block *, void *, size_t);
 
 
 /* In lto-streamer-out.c  */
@@ -867,6 +869,18 @@ 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 produce_asm (struct output_block *ob, tree fn);
+extern void lto_output_string (struct output_block *,
+                              struct lto_output_stream *,
+                              const char *);
+extern void lto_output_string_with_length (struct output_block *,
+                                          struct lto_output_stream *,
+                                          const char *,
+                                          unsigned int);
+void lto_output_decl_state_streams (struct output_block *,
+                                   struct lto_out_decl_state *);
+void lto_output_decl_state_refs (struct output_block *,
+                                struct lto_output_stream *,
+                                struct lto_out_decl_state *);
 
 
 /* In lto-cgraph.c  */
@@ -911,10 +925,11 @@ 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 void lto_symtab_free (void);
+extern GTY(()) VEC(tree,gc) *lto_global_var_decls;
 
 
 /* In lto-opts.c.  */
-extern void lto_register_user_option (size_t, const char *, int, int);
+extern void lto_register_user_option (size_t, const char *, int, unsigned int);
 extern void lto_read_file_options (struct lto_file_decl_data *);
 extern void lto_write_options (void);
 extern void lto_reissue_options (void);