This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: wide-int, lto
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>, Kenneth Zadeck <zadeck at naturalbridge dot com>
- Date: Mon, 25 Nov 2013 12:09:26 +0100
- Subject: Re: wide-int, lto
- Authentication-results: sourceware.org; auth=none
- References: <47EC5218-729C-43C9-A423-2D9056C80039 at comcast dot net>
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.