* lto-cgraph.c (output_cgraph): Rename to ...
(output_symtab): ... this one. Update for LTO_section_symtab_nodes.
(input_cgraph): Rename to ...
(input_symtab): ... this one. Update for LTO_section_symtab_nodes.
* lto-streamer-out.c (create_output_block): Do not set
section_type.
(produce_asm): Likewise.
(lto_output_toplevel_asms): Likewise.
(produce_asm_for_decls): Likewise.
(lto_output): Use output_symtab.
* lto-section-in.c (lto_section_name): Update.
* lto-section-out.c (lto_destroy_simple_output_block): Remove section_type.
* lto-streamer.h (enum lto_section_type): Remove LTO_section_varpool;
rename LTO_section_cgraph to LTO_section_symtab_nodes.
(struct lto_header): Remove section_type.
* lto.c (read_cgraph_and_symbols): Use input_symtab.
From-SVN: r190312
+2012-08-11 Jan Hubicka <jh@suse.cz>
+
+ * lto-cgraph.c (output_cgraph): Rename to ...
+ (output_symtab): ... this one. Update for LTO_section_symtab_nodes.
+ (input_cgraph): Rename to ...
+ (input_symtab): ... this one. Update for LTO_section_symtab_nodes.
+ * lto-streamer-out.c (create_output_block): Do not set
+ section_type.
+ (produce_asm): Likewise.
+ (lto_output_toplevel_asms): Likewise.
+ (produce_asm_for_decls): Likewise.
+ (lto_output): Use output_symtab.
+ * lto-section-in.c (lto_section_name): Update.
+ * lto-section-out.c (lto_destroy_simple_output_block): Remove section_type.
+ * lto-streamer.h (enum lto_section_type): Remove LTO_section_varpool;
+ rename LTO_section_cgraph to LTO_section_symtab_nodes.
+ (struct lto_header): Remove section_type.
+
2012-08-11 Jan Hubicka <jh@suse.cz>
* cgraph.h (vector types for symtab_node): Add.
}
}
-/* Output the part of the cgraph in SET. */
+/* Output the part of the symtab in SET and VSET. */
void
-output_cgraph (cgraph_node_set set, varpool_node_set vset)
+output_symtab (cgraph_node_set set, varpool_node_set vset)
{
struct cgraph_node *node;
struct lto_simple_output_block *ob;
if (flag_wpa)
output_cgraph_opt_summary (set);
- ob = lto_create_simple_output_block (LTO_section_cgraph);
+ ob = lto_create_simple_output_block (LTO_section_symtab_nodes);
output_profile_summary (ob);
}
}
-/* Input and merge the cgraph from each of the .o files passed to
+/* Input and merge the symtab from each of the .o files passed to
lto1. */
void
-input_cgraph (void)
+input_symtab (void)
{
struct lto_file_decl_data **file_data_vec = lto_get_file_decl_data ();
struct lto_file_decl_data *file_data;
struct lto_input_block *ib;
VEC(symtab_node, heap) *nodes;
- ib = lto_create_simple_input_block (file_data, LTO_section_cgraph,
+ ib = lto_create_simple_input_block (file_data, LTO_section_symtab_nodes,
&data, &len);
if (!ib)
fatal_error ("cannot find LTO cgraph in %s", file_data->file_name);
input_profile_summary (ib, file_data);
file_data->symtab_node_encoder = lto_symtab_encoder_new ();
nodes = input_cgraph_1 (file_data, ib);
- lto_destroy_simple_input_block (file_data, LTO_section_cgraph,
+ lto_destroy_simple_input_block (file_data, LTO_section_symtab_nodes,
ib, data, len);
ib = lto_create_simple_input_block (file_data, LTO_section_refs,
"decls",
"function_body",
"statics",
- "cgraph",
- "vars",
+ "symtab",
"refs",
"asm",
"jmpfuncs",
"pureconst",
"reference",
- "symtab",
+ "symtab_nodes",
"opts",
"cgraphopt",
"inline"
memset (&header, 0, sizeof (struct lto_simple_header));
header.lto_header.major_version = LTO_major_version;
header.lto_header.minor_version = LTO_minor_version;
- header.lto_header.section_type = LTO_section_cgraph;
header.compressed_size = 0;
/* Write the header. */
header.lto_header.major_version = LTO_major_version;
header.lto_header.minor_version = LTO_minor_version;
- header.lto_header.section_type = section_type;
header.compressed_size = 0;
/* Write the header. */
header.lto_header.major_version = LTO_major_version;
header.lto_header.minor_version = LTO_minor_version;
- header.lto_header.section_type = LTO_section_asm;
header.main_size = ob->main_stream->total_size;
header.string_size = ob->string_stream->total_size;
be done now to make sure that all the statements in every function
have been renumbered so that edges can be associated with call
statements using the statement UIDs. */
- output_cgraph (set, vset);
+ output_symtab (set, vset);
#ifdef ENABLE_CHECKING
lto_bitmap_free (output);
header.lto_header.major_version = LTO_major_version;
header.lto_header.minor_version = LTO_minor_version;
- header.lto_header.section_type = LTO_section_decls;
/* Currently not used. This field would allow us to preallocate
the globals vector, so that it need not be resized as it is extended. */
/* Write the main out-decl state, followed by out-decl states of
functions. */
- decl_state_stream = ((struct lto_output_stream *)
- xcalloc (1, sizeof (struct lto_output_stream)));
+ decl_state_stream = XCNEW (struct lto_output_stream);
num_decl_states = num_fns + 1;
lto_output_data_stream (decl_state_stream, &num_decl_states,
sizeof (num_decl_states));
LTO_section_decls = 0,
LTO_section_function_body,
LTO_section_static_initializer,
- LTO_section_cgraph,
- LTO_section_varpool,
+ LTO_section_symtab,
LTO_section_refs,
LTO_section_asm,
LTO_section_jump_functions,
LTO_section_ipa_pure_const,
LTO_section_ipa_reference,
- LTO_section_symtab,
+ LTO_section_symtab_nodes,
LTO_section_opts,
LTO_section_cgraph_opt_sum,
LTO_section_inline_summary,
{
int16_t major_version;
int16_t minor_version;
- enum lto_section_type section_type;
};
/* The header for a function body. */
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);
+void output_symtab (cgraph_node_set, varpool_node_set);
+void input_symtab (void);
bool referenced_from_other_partition_p (struct ipa_ref_list *,
cgraph_node_set,
varpool_node_set vset);
+2012-07-24 Jan Hubicka <jh@suse.cz>
+
+ * lto.c (read_cgraph_and_symbols): Use input_symtab.
+
2012-07-24 Uros Bizjak <ubizjak@gmail.com>
* lto-tree.h (lang_decl): Add variable_size GTY option.
fprintf (stderr, "\nReading the callgraph\n");
timevar_push (TV_IPA_LTO_CGRAPH_IO);
- /* Read the callgraph. */
- input_cgraph ();
+ /* Read the symtab. */
+ input_symtab ();
timevar_pop (TV_IPA_LTO_CGRAPH_IO);
if (!quiet_flag)