On Mon, Aug 05, 2024 at 02:24:00PM +0000, Prathamesh Kulkarni wrote: > gcc/ChangeLog: > PR ipa/96265 > PR ipa/111937 > * data-streamer-in.cc (streamer_read_poly_uint64): Remove code for > streaming, and call poly_int_read_common instead. > (streamer_read_poly_int64): Likewise. > * data-streamer.cc (host_num_poly_int_coeffs): Conditionally define > new variable if ACCEL_COMPILER is defined. > * data-streamer.h (host_num_poly_int_coeffs): Declare. > (poly_int_read_common): New function template. > (bp_unpack_poly_value): Remove code for streaming and call > poly_int_read_common instead. > * lto-streamer-in.cc (lto_input_mode_table): Stream-in host > NUM_POLY_INT_COEFFS into host_num_poly_int_coeffs if ACCEL_COMPILER > is defined. > * lto-streamer-out.cc (lto_write_mode_table): Stream out > NUM_POLY_INT_COEFFS if offloading is enabled. > * poly-int.h (MAX_NUM_POLY_INT_COEFFS_BITS): New macro. > * tree-streamer-in.cc (lto_input_ts_poly_tree_pointers): Adjust > streaming-in of poly_int. > > Signed-off-by: Prathamesh Kulkarni <prathame...@nvidia.com>
> --- a/gcc/data-streamer.cc > +++ b/gcc/data-streamer.cc > @@ -28,6 +28,14 @@ along with GCC; see the file COPYING3. If not see > #include "cgraph.h" > #include "data-streamer.h" > > +/* For offloading -- While streaming-out, host NUM_POLY_INT_COEFFS is > + stored at beginning of mode_table. While streaming-in, the value is read > in Two spaces after . rather than just one, and because of that move in on the next line. > + host_num_poly_int_coeffs. */ Otherwise LGTM. Jakub