This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wide-int, lto


On Sat, Nov 23, 2013 at 8:22 PM, Mike Stump <mikestump@comcast.net> wrote:
> Richi has asked the we break the wide-int patch so that the individual port and front end maintainers can review their parts without have to go through the entire patch.    This patch covers the lto code.
>
> Ok?

-         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);

please add streamer_read/write_wi () helpers to data-streamer*

replicating the above loop N times is too ugly.

The rest looks ok to me.

Thanks,
Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]