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,
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
{
/* 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;
/* 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;
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. */