summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-11 08:38:59 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-11 08:38:59 +0000
commit02b699d50d860e2554adddf09753492b6f4bda66 (patch)
tree0793ee7ca02faf63574b64bf05c816cc6b8837e1 /gcc
parent97d653b923462b4bbe0d4458357b96acd0e936f5 (diff)
downloadgcc-02b699d50d860e2554adddf09753492b6f4bda66.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190312 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog18
-rw-r--r--gcc/lto-cgraph.c14
-rw-r--r--gcc/lto-section-in.c5
-rw-r--r--gcc/lto-section-out.c1
-rw-r--r--gcc/lto-streamer-out.c8
-rw-r--r--gcc/lto-streamer.h10
-rw-r--r--gcc/lto/ChangeLog4
-rw-r--r--gcc/lto/lto.c4
8 files changed, 39 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4717f31d994..6eb422b0ca8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,23 @@
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.
* ipa-reference.c (ipa_reference_write_optimization_summary): Update
for new symtab encoder.
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 9ba21e089a5..c77408f8514 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -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,
diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c
index ad4077e04f3..8d49765b6a6 100644
--- a/gcc/lto-section-in.c
+++ b/gcc/lto-section-in.c
@@ -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"
diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c
index ea15efb872c..3de48e03df4 100644
--- a/gcc/lto-section-out.c
+++ b/gcc/lto-section-out.c
@@ -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;
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 5a691003a1c..0426401d5ef 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -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));
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index 39a40a45e9d..b874b0aa016 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -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);
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index c0ff256f3da..fb1ea42e25e 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -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.
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 4f8c764b3f3..bd91c391fd1 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -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)