OSDN Git Service

More improvements to sparc VIS vec_init code generation.
[pf3gnuchains/gcc-fork.git] / gcc / lto-streamer-in.c
index f18b944..1847738 100644 (file)
@@ -764,27 +764,40 @@ fixup_call_stmt_edges (struct cgraph_node *orig, gimple *stmts)
       }
 }
 
-/* Read the body of function FN_DECL from DATA_IN using input block IB.  */
+
+/* Input the base body of struct function FN from DATA_IN
+   using input block IB.  */
 
 static void
-input_function (tree fn_decl, struct data_in *data_in,
-               struct lto_input_block *ib)
+input_struct_function_base (struct function *fn, struct data_in *data_in,
+                            struct lto_input_block *ib)
 {
-  struct function *fn;
-  enum LTO_tags tag;
-  gimple *stmts;
-  basic_block bb;
   struct bitpack_d bp;
-  struct cgraph_node *node;
-  tree args, narg, oarg;
   int len;
 
-  fn = DECL_STRUCT_FUNCTION (fn_decl);
-  tag = streamer_read_record_start (ib);
-  clear_line_info (data_in);
+  /* Read the static chain and non-local goto save area.  */
+  fn->static_chain_decl = stream_read_tree (ib, data_in);
+  fn->nonlocal_goto_save_area = stream_read_tree (ib, data_in);
 
-  gimple_register_cfg_hooks ();
-  lto_tag_check (tag, LTO_function);
+  /* Read all the local symbols.  */
+  len = streamer_read_hwi (ib);
+  if (len > 0)
+    {
+      int i;
+      VEC_safe_grow (tree, gc, fn->local_decls, len);
+      for (i = 0; i < len; i++)
+       {
+         tree t = stream_read_tree (ib, data_in);
+         VEC_replace (tree, fn->local_decls, i, t);
+       }
+    }
+
+  /* Input the function start and end loci.  */
+  fn->function_start_locus = lto_input_location (ib, data_in);
+  fn->function_end_locus = lto_input_location (ib, data_in);
+
+  /* Input the current IL state of the function.  */
+  fn->curr_properties = streamer_read_uhwi (ib);
 
   /* Read all the attributes for FN.  */
   bp = streamer_read_bitpack (ib);
@@ -802,30 +815,30 @@ input_function (tree fn_decl, struct data_in *data_in,
   fn->calls_setjmp = bp_unpack_value (&bp, 1);
   fn->va_list_fpr_size = bp_unpack_value (&bp, 8);
   fn->va_list_gpr_size = bp_unpack_value (&bp, 8);
+}
 
-  /* Input the function start and end loci.  */
-  fn->function_start_locus = lto_input_location (ib, data_in);
-  fn->function_end_locus = lto_input_location (ib, data_in);
 
-  /* Input the current IL state of the function.  */
-  fn->curr_properties = streamer_read_uhwi (ib);
+/* Read the body of function FN_DECL from DATA_IN using input block IB.  */
 
-  /* Read the static chain and non-local goto save area.  */
-  fn->static_chain_decl = stream_read_tree (ib, data_in);
-  fn->nonlocal_goto_save_area = stream_read_tree (ib, data_in);
+static void
+input_function (tree fn_decl, struct data_in *data_in,
+               struct lto_input_block *ib)
+{
+  struct function *fn;
+  enum LTO_tags tag;
+  gimple *stmts;
+  basic_block bb;
+  struct cgraph_node *node;
+  tree args, narg, oarg;
 
-  /* Read all the local symbols.  */
-  len = streamer_read_hwi (ib);
-  if (len > 0)
-    {
-      int i;
-      VEC_safe_grow (tree, gc, fn->local_decls, len);
-      for (i = 0; i < len; i++)
-       {
-         tree t = stream_read_tree (ib, data_in);
-         VEC_replace (tree, fn->local_decls, i, t);
-       }
-    }
+  fn = DECL_STRUCT_FUNCTION (fn_decl);
+  tag = streamer_read_record_start (ib);
+  clear_line_info (data_in);
+
+  gimple_register_cfg_hooks ();
+  lto_tag_check (tag, LTO_function);
+
+  input_struct_function_base (fn, data_in, ib);
 
   /* Read all function arguments.  We need to re-map them here to the
      arguments of the merged function declaration.  */