OSDN Git Service

* gnat.dg/lto6.adb: Remove superfluous -gnat05 switch.
[pf3gnuchains/gcc-fork.git] / gcc / lto-streamer.h
index cc1922a..4f3d60d 100644 (file)
@@ -257,6 +257,7 @@ enum lto_section_type
   LTO_section_static_initializer,
   LTO_section_cgraph,
   LTO_section_varpool,
+  LTO_section_refs,
   LTO_section_jump_functions,
   LTO_section_ipa_pure_const,
   LTO_section_ipa_reference,
@@ -466,6 +467,20 @@ struct lto_cgraph_encoder_d
 
 typedef struct lto_cgraph_encoder_d *lto_cgraph_encoder_t;
 
+/* Encoder data structure used to stream callgraph nodes.  */
+struct lto_varpool_encoder_d
+{
+  /* Map nodes to reference number. */
+  struct pointer_map_t *map;
+
+  /* Map reference number to node. */
+  VEC(varpool_node_ptr,heap) *nodes;
+
+  /* Map of nodes where we want to output initializer.  */
+  struct pointer_set_t *initializer;
+};
+typedef struct lto_varpool_encoder_d *lto_varpool_encoder_t;
+
 /* Mapping from indices to trees.  */
 struct GTY(()) lto_tree_ref_table
 {
@@ -520,6 +535,9 @@ struct lto_out_decl_state
   /* Encoder for cgraph nodes.  */
   lto_cgraph_encoder_t cgraph_node_encoder;
 
+  /* Encoder for varpool nodes.  */
+  lto_varpool_encoder_t varpool_node_encoder;
+
   /* If this out-decl state belongs to a function, fn_decl points to that
      function.  Otherwise, it is NULL. */
   tree fn_decl;
@@ -546,6 +564,9 @@ struct GTY(()) lto_file_decl_data
   /* Table of cgraph nodes present in this file.  */
   lto_cgraph_encoder_t GTY((skip)) cgraph_node_encoder;
 
+  /* Table of varpool nodes present in this file.  */
+  lto_varpool_encoder_t GTY((skip)) varpool_node_encoder;
+
   /* Hash table maps lto-related section names to location in file.  */
   htab_t GTY((param_is (struct lto_in_decl_state))) function_decl_states;
 
@@ -825,11 +846,19 @@ struct cgraph_node *lto_cgraph_encoder_deref (lto_cgraph_encoder_t, int);
 int lto_cgraph_encoder_lookup (lto_cgraph_encoder_t, struct cgraph_node *);
 lto_cgraph_encoder_t lto_cgraph_encoder_new (void);
 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 lto_cgraph_encoder_delete (lto_cgraph_encoder_t);
+struct varpool_node *lto_varpool_encoder_deref (lto_varpool_encoder_t, int);
+int lto_varpool_encoder_lookup (lto_varpool_encoder_t, struct varpool_node *);
+lto_varpool_encoder_t lto_varpool_encoder_new (void);
+int lto_varpool_encoder_encode (lto_varpool_encoder_t, struct varpool_node *);
+void lto_varpool_encoder_delete (lto_varpool_encoder_t);
+bool lto_varpool_encoder_encode_initializer_p (lto_varpool_encoder_t,
+                                              struct varpool_node *);
+void output_cgraph (cgraph_node_set, varpool_node_set);
 void input_cgraph (void);
-void output_varpool (varpool_node_set);
-void input_varpool (void);
+bool referenced_from_other_partition_p (struct ipa_ref_list *,
+                                       cgraph_node_set,
+                                       varpool_node_set vset);
 
 
 /* In lto-symtab.c.  */