On Thu, Aug 4, 2016 at 10:09 AM, kugan <kugan.vivekanandara...@linaro.org> wrote: > Hi Richard, > > Thanks for the review. > > On 04/08/16 17:26, Richard Biener wrote: >> >> On Thu, Aug 4, 2016 at 6:12 AM, kugan <kugan.vivekanandara...@linaro.org> >> wrote: >>> >>> Hi, >>> >>> During IPA-VRP implementation, I realized that we don't support streaming >>> wide_int in LTO. Attached patch does this. Tested with IPA-VRP. Is this >>> OK >>> for trunk if bootstrap and regression testing is fine. >> >> >> Hmm, those functions belong to data-streamer-{in,out}.c and >> data-streamer.h >> and should be named streamer_write_wide_int / streamer_read_wide_int. >> >> Note that we already have (non-exported) streamer_write_wi / >> streamer_read_wi >> which operate on widest_ints. Those also reside in >> lto-streamer-{in,out}.c and >> should be moved to data-streamer.h (and be renamed to >> streamer_write_widest_int). > > > I have now streamer_write_wide_int and streamer_write_widest_int. Similarly > for reading. There is lot of similarity. I am not very familiar with > wide_int so kept it that way. Is this OK now?
I also thought about merging both cases but I don't see how it is easily possible in a way that would reduce the number of source lines (you could split out an inline worker, but that wouldn't save anything I think) Yes. Thanks, Richard. > Thanks, > Kugan > > gcc/ChangeLog: > > 2016-08-04 Kugan Vivekanandarajah <kug...@linaro.org> > > * data-streamer-in.c (streamer_read_wide_int): New. > (streamer_read_widest_int): Renamed function. > * data-streamer-out.c (streamer_write_wide_int): New > (streamer_write_widest_int): Renamed function. > * lto-streamer-in.c (streamer_read_wi): Renamed and moved to > data-stream-in.c. > (input_cfg): Call renamed function. > * lto-streamer-out.c (streamer_write_wi): Renamed and moved to > data-stream-out.c. > (output_cfg): Call renamed function. > * data-streamer.h: Add declarations. > >> >> There is no need to add additional hooks. >> >> Can you do this please? >> >> Thanks, >> Richard. >> >>> Thanks, >>> Kugan >>> >>> gcc/ChangeLog: >>> >>> 2016-08-04 Kugan Vivekanandarajah <kug...@linaro.org> >>> >>> * lto-streamer-in.c (lto_input_wide_int): New. >>> * lto-streamer-out.c (lto_output_wide_int): Likewise. >>> * lto-streamer.c (lto_streamer_hooks_init): Init write_wide_int >>> and >>> read_wide_int. >>> * lto-streamer.h: Declare lto_input_wide_int and >>> lto_output_wide_int. >>> * streamer-hooks.h (struct streamer_hooks): Add write_wide_int >>> and >>> read_wide_int. >>> (stream_write_wide_int): New macro. >>> (stream_read_wide_int): Likewise. >>> >