]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lto-cgraph.c (output_cgraph): Rename to ...
authorJan Hubicka <jh@suse.cz>
Sat, 11 Aug 2012 08:38:59 +0000 (10:38 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 11 Aug 2012 08:38:59 +0000 (08:38 +0000)
* 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

gcc/ChangeLog
gcc/lto-cgraph.c
gcc/lto-section-in.c
gcc/lto-section-out.c
gcc/lto-streamer-out.c
gcc/lto-streamer.h
gcc/lto/ChangeLog
gcc/lto/lto.c

index 4717f31d994f6da8d87f277464eb076c228eb675..6eb422b0ca890caf9d5feaebf46335934ca77f97 100644 (file)
@@ -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.
index 9ba21e089a56955b0eb034941ba8f33be16482a1..c77408f85144b1efd31846e434612ab47051e4e5 100644 (file)
@@ -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,
index ad4077e04f39fc6a7a63cc739eb9984b8f8924ed..8d49765b6a69bcafd4d25ef9049d17b1cb5ed955 100644 (file)
@@ -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"
index ea15efb872c9616a54065413b36ca62c0164e751..3de48e03df48a3772c783eddacd53ad03ba47663 100644 (file)
@@ -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;
 
index 5a691003a1c4325a6506c0e927d0df8557488f0c..0426401d5ef7ac283b07b06397ce2eba706fe3e9 100644 (file)
@@ -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));
index 39a40a45e9d6416866ac0188e25562be6fc31f08..b874b0aa016dc262e7abf3b74ccb8f0e43e12f98 100644 (file)
@@ -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);
index c0ff256f3dac23888be287f763e746b15bfd34a0..fb1ea42e25e26287d7fff184beb68a652c46a397 100644 (file)
@@ -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.
index 4f8c764b3f37f0e1941571304523c18cca1015c2..bd91c391fd142a12fecc41debdbce9c366a1d26b 100644 (file)
@@ -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)