diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-11 03:04:35 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-08-11 03:04:35 +0000 |
commit | 70225339fc4e163f336e06ce11e3460caf57a8d6 (patch) | |
tree | 9ecc46e97e1f006538b5fc2f9be799708d6b205c /gcc/lto-streamer.h | |
parent | e5bf9f49b6d5c55779d26e8f840465ee70152ed5 (diff) | |
download | gcc-70225339fc4e163f336e06ce11e3460caf57a8d6.tar.gz |
* cgraph.h (vector types for symtab_node): Add.
* ipa-reference.c (ipa_reference_write_optimization_summary): Update
for new symtab encoder.
(ipa_reference_read_optimization_summary): Likewise.
* lto-cgraph.c (output_varpool): Remove.
(input_cgraph_opt_summary): Take symtab nodes vector as argument.
(LTO_cgraph_tags): Rename to ...
(LTO_symtab_tags): ... this one; add LTO_symtab_variable.
(lto_cgraph_encoder_new): Rename to ...
(lto_symtab_encoder_new): ... this on.
(lto_cgraph_encoder_encode): Rename to ...
(lto_symtab_encoder_encode): ... this one.
(lto_cgraph_encoder_delete): Rename to ...
(lto_symtab_encoder_delete): ... this one.
(lto_cgraph_encoder_deref): Rename to ...
(lto_symtab_encoder_deref): ... this one.
(lto_cgraph_encoder_encode_body_p): Rename to ...
(lto_symtab_encoder_encode_body_p): ... this one.
(lto_varpool_encoder_new, lto_varpool_encoder_delete,
lto_varpool_encoder_encode, lto_varpool_encoder_lookup,
lto_varpool_encoder_deref): Remove.
(lto_varpool_encoder_encode_initializer_p): Rename to ...
(lto_symtab_encoder_encode_initializer_p): ... this one.
(lto_set_varpool_encoder_encode_initializer): Rename to ...
(lto_set_symtab_encoder_encode_initializer): ... this one.
(lto_output_edge): Update.
(lto_output_node): Update.
(lto_output_varpool_node): Update; stream out LTO_symtab_variable tag.
(lto_output_ref): Drop varpool_encoder; update.
(add_node_to): Update.
(add_references): Update.
(output_outgoing_cgraph_edges): Update.
(output_refs): Update.
(compute_ltrans_boundary): Update.
(output_cgraph): Update; output varpools too.
(input_overwrite_node): Update.
(output_varpool): Remove.
(input_node): Update.
(input_ref): Update.
(input_edge): Update.
(input_cgraph_1): Update; input varpool too; unify fixup code.
(input_varpool_1): Remove.
(input_refs): Update.
(input_cgraph): Update.
(output_node_opt_summary): Update.
(input_cgraph_opt_section): Update.
(input_cgraph_opt_summary): Update.
* ipa-pure-const.c (pure_const_write_summary): Update.
(pure_const_read_summary): Update.
* lto-streamer-out.c (lto_write_tree): Update.
(lto_output): Likewise.
(produce_symtab): Update.
(produce_asm_for_decls): Update.
* ipa-inline-analysis.c (inline_read_section): Update.
(inline_write_summary): Update.
* ipa-prop.c (ipa_write_node_info): Update.
(ipa_prop_read_section): Update.
* lto-streamer.h (lto_cgraph_encoder_d): Rename to ...
(lto_symtab_encoder_d): ... this one; add initializer.
(lto_cgraph_encoder_t): Rename to ...
(lto_symtab_encoder_t): ... this one.
(lto_cgraph_encoder_size): Rename to ...
(lto_symtab_encoder_size): ... this one.
(lto_varpool_encoder_d): ... remove.
(lto_varpool_encoder_t): Remove.
(lto_out_decl_state): Remove cgraph_node_encoder, varpool_node_encoder
add symtab_node_encoder.
(lto_file_decl_data): Likewise.
(lto_cgraph_encoder_deref, lto_cgraph_encoder_lookup,
lto_cgraph_encoder_new, lto_cgraph_encoder_encode, lto_cgraph_encoder_delete,
lto_cgraph_encoder_encode_body_p, lto_varpool_encoder_encode_body_p,
lto_varpool_encoder_deref, lto_varpool_encoder_lookup, lto_varpool_encoder_new,
lto_varpool_encoder_encode, lto_varpool_encoder_delete,
lto_varpool_encoder_encode_initializer_p): Remove.
(lto_symtab_encoder_deref, lto_symtab_encoder_lookup,
lto_symtab_encoder_t, lto_symtab_encoder_encode, lto_symtab_encoder_delete,
lto_symtab_encoder_encode_body_p, lto_symtab_encoder_encode_initializer_p):
New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190309 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer.h')
-rw-r--r-- | gcc/lto-streamer.h | 66 |
1 files changed, 16 insertions, 50 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index 5c7bdd281d3..39a40a45e9d 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -423,49 +423,28 @@ struct lto_stats_d }; /* Encoder data structure used to stream callgraph nodes. */ -struct lto_cgraph_encoder_d +struct lto_symtab_encoder_d { /* Map nodes to reference number. */ struct pointer_map_t *map; /* Map reference number to node. */ - VEC(cgraph_node_ptr,heap) *nodes; + VEC(symtab_node,heap) *nodes; /* Map of nodes where we want to output body. */ struct pointer_set_t *body; -}; - -typedef struct lto_cgraph_encoder_d *lto_cgraph_encoder_t; - -/* Return number of encoded nodes in ENCODER. */ - -static inline int -lto_cgraph_encoder_size (lto_cgraph_encoder_t encoder) -{ - return VEC_length (cgraph_node_ptr, encoder->nodes); -} - - -/* 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; + +typedef struct lto_symtab_encoder_d *lto_symtab_encoder_t; /* Return number of encoded nodes in ENCODER. */ static inline int -lto_varpool_encoder_size (lto_varpool_encoder_t encoder) +lto_symtab_encoder_size (lto_symtab_encoder_t encoder) { - return VEC_length (varpool_node_ptr, encoder->nodes); + return VEC_length (symtab_node, encoder->nodes); } /* Mapping from indices to trees. */ @@ -520,10 +499,7 @@ struct lto_out_decl_state struct lto_tree_ref_encoder streams[LTO_N_DECL_STREAMS]; /* Encoder for cgraph nodes. */ - lto_cgraph_encoder_t cgraph_node_encoder; - - /* Encoder for varpool nodes. */ - lto_varpool_encoder_t varpool_node_encoder; + lto_symtab_encoder_t symtab_node_encoder; /* If this out-decl state belongs to a function, fn_decl points to that function. Otherwise, it is NULL. */ @@ -549,10 +525,7 @@ struct GTY(()) lto_file_decl_data struct lto_in_decl_state *global_decl_state; /* 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; + lto_symtab_encoder_t GTY((skip)) symtab_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; @@ -837,23 +810,16 @@ void lto_output_location (struct output_block *, location_t); /* In lto-cgraph.c */ -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); -bool lto_cgraph_encoder_encode_body_p (lto_cgraph_encoder_t, +symtab_node lto_symtab_encoder_deref (lto_symtab_encoder_t, int); +int lto_symtab_encoder_lookup (lto_symtab_encoder_t, symtab_node); +lto_symtab_encoder_t lto_symtab_encoder_new (void); +int lto_symtab_encoder_encode (lto_symtab_encoder_t, symtab_node); +void lto_symtab_encoder_delete (lto_symtab_encoder_t); +bool lto_symtab_encoder_encode_body_p (lto_symtab_encoder_t, struct cgraph_node *); -bool lto_varpool_encoder_encode_body_p (lto_varpool_encoder_t, - struct varpool_node *); -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 *); +bool lto_symtab_encoder_encode_initializer_p (lto_symtab_encoder_t, + struct varpool_node *); void output_cgraph (cgraph_node_set, varpool_node_set); void input_cgraph (void); bool referenced_from_other_partition_p (struct ipa_ref_list *, |