]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/lto-streamer-in.c
Merge from trunk.
[thirdparty/gcc.git] / gcc / lto-streamer-in.c
index de25925b6235d3e06034f485d82a61056c12a3c5..c5b73ffb8d90a3c86b10bf4054155d0c0f2ed056 100644 (file)
@@ -702,14 +702,26 @@ input_cfg (struct lto_input_block *ib, struct function *fn,
       loop->any_upper_bound = streamer_read_hwi (ib);
       if (loop->any_upper_bound)
        {
-         loop->nb_iterations_upper_bound.low = streamer_read_uhwi (ib);
-         loop->nb_iterations_upper_bound.high = streamer_read_hwi (ib);
+         HOST_WIDE_INT a[WIDE_INT_MAX_ELTS];
+         int i;
+         int prec ATTRIBUTE_UNUSED = streamer_read_uhwi (ib);
+         int len = streamer_read_uhwi (ib);
+         for (i = 0; i < len; i++)
+           a[i] = streamer_read_hwi (ib);
+         
+         loop->nb_iterations_upper_bound = widest_int::from_array (a, len);
        }
       loop->any_estimate = streamer_read_hwi (ib);
       if (loop->any_estimate)
        {
-         loop->nb_iterations_estimate.low = streamer_read_uhwi (ib);
-         loop->nb_iterations_estimate.high = streamer_read_hwi (ib);
+         HOST_WIDE_INT a[WIDE_INT_MAX_ELTS];
+         int i;
+         int prec ATTRIBUTE_UNUSED = streamer_read_uhwi (ib);
+         int len = streamer_read_uhwi (ib);
+         for (i = 0; i < len; i++)
+           a[i] = streamer_read_hwi (ib);
+         
+         loop->nb_iterations_estimate = widest_int::from_array (a, len);
        }
 
       place_new_loop (fn, loop);
@@ -1259,12 +1271,17 @@ lto_input_tree_1 (struct lto_input_block *ib, struct data_in *data_in,
     }
   else if (tag == LTO_integer_cst)
     {
-      /* For shared integer constants in singletons we can use the existing
-         tree integer constant merging code.  */
+      /* For shared integer constants in singletons we can use the
+         existing tree integer constant merging code.  */
       tree type = stream_read_tree (ib, data_in);
-      unsigned HOST_WIDE_INT low = streamer_read_uhwi (ib);
-      HOST_WIDE_INT high = streamer_read_hwi (ib);
-      result = build_int_cst_wide (type, low, high);
+      unsigned HOST_WIDE_INT len = streamer_read_uhwi (ib);
+      unsigned HOST_WIDE_INT i;
+      HOST_WIDE_INT a[WIDE_INT_MAX_ELTS]; 
+
+      for (i = 0; i < len; i++)
+       a[i] = streamer_read_hwi (ib);
+      result = wide_int_to_tree (type, wide_int::from_array
+                                (a, len, TYPE_PRECISION (type)));
       streamer_tree_cache_append (data_in->reader_cache, result, hash);
     }
   else if (tag == LTO_tree_scc)