lto-cgraph.c (output_cgraph): Rename to ...
* 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
This commit is contained in:
parent
3af76e5a95
commit
ab96cc5b4d
@ -1,3 +1,21 @@
|
||||
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.
|
||||
|
@ -747,10 +747,10 @@ compute_ltrans_boundary (struct lto_out_decl_state *state,
|
||||
}
|
||||
}
|
||||
|
||||
/* 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;
|
||||
@ -762,7 +762,7 @@ output_cgraph (cgraph_node_set set, varpool_node_set vset)
|
||||
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);
|
||||
|
||||
@ -1301,11 +1301,11 @@ merge_profile_summaries (struct lto_file_decl_data **file_data_vec)
|
||||
}
|
||||
}
|
||||
|
||||
/* 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;
|
||||
@ -1321,14 +1321,14 @@ input_cgraph (void)
|
||||
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,
|
||||
|
@ -49,14 +49,13 @@ const char *lto_section_name[LTO_N_SECTION_TYPES] =
|
||||
"decls",
|
||||
"function_body",
|
||||
"statics",
|
||||
"cgraph",
|
||||
"vars",
|
||||
"symtab",
|
||||
"refs",
|
||||
"asm",
|
||||
"jmpfuncs",
|
||||
"pureconst",
|
||||
"reference",
|
||||
"symtab",
|
||||
"symtab_nodes",
|
||||
"opts",
|
||||
"cgraphopt",
|
||||
"inline"
|
||||
|
@ -412,7 +412,6 @@ lto_destroy_simple_output_block (struct lto_simple_output_block *ob)
|
||||
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;
|
||||
|
||||
|
@ -707,7 +707,6 @@ produce_asm (struct output_block *ob, tree fn)
|
||||
/* 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;
|
||||
|
||||
@ -893,7 +892,6 @@ lto_output_toplevel_asms (void)
|
||||
/* 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;
|
||||
@ -1020,7 +1018,7 @@ lto_output (cgraph_node_set set, varpool_node_set vset)
|
||||
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);
|
||||
@ -1430,7 +1428,6 @@ produce_asm_for_decls (cgraph_node_set set ATTRIBUTE_UNUSED,
|
||||
|
||||
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. */
|
||||
@ -1457,8 +1454,7 @@ produce_asm_for_decls (cgraph_node_set set ATTRIBUTE_UNUSED,
|
||||
|
||||
/* 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));
|
||||
|
@ -235,14 +235,13 @@ enum lto_section_type
|
||||
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,
|
||||
@ -336,7 +335,6 @@ struct lto_header
|
||||
{
|
||||
int16_t major_version;
|
||||
int16_t minor_version;
|
||||
enum lto_section_type section_type;
|
||||
};
|
||||
|
||||
/* The header for a function body. */
|
||||
@ -820,8 +818,8 @@ bool lto_symtab_encoder_encode_body_p (lto_symtab_encoder_t,
|
||||
|
||||
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);
|
||||
|
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
@ -1807,8 +1807,8 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user