22#ifndef GCC_DATA_STREAMER_H
23#define GCC_DATA_STREAMER_H
66 const char *,
unsigned int,
bool);
68 const char *,
unsigned int,
bool);
72 unsigned HOST_WIDE_INT);
200template<
typename C,
typename F,
typename ...Args>
217 for (
i = 0;
i < num_poly_int_coeffs;
i++)
218 x.
coeffs[
i] = read_coeff (args...);
225 x.
coeffs[
i] = read_coeff (args...);
228 for (;
i < num_poly_int_coeffs;
i++)
230 C val = read_coeff (args...);
233 "degree of %<poly_int%> exceeds "
234 "%<NUM_POLY_INT_COEFFS%> (%d)",
261 *(current_pointer++) = c;
273 if (ib->
p >= ib->
len)
275 return (ib->
data[ib->
p++]);
288 HOST_WIDE_INT range = max - min;
291 && range < 0x7fffffff);
306 HOST_WIDE_INT range = max - min;
311 HOST_WIDE_INT val = (HOST_WIDE_INT) (uval + (
unsigned HOST_WIDE_INT) min);
312 if (val < min || val > max)
327 HOST_WIDE_INT range = max - min;
331 && range < 0x7fffffff);
346 HOST_WIDE_INT range = max - min;
352 if (val < min || val > max)
359#define streamer_write_enum(obs,enum_name,enum_last,val) \
360 streamer_write_hwi_in_range ((obs), 0, (int)(enum_last) - 1, (int)(val))
364#define streamer_read_enum(ib,enum_name,enum_last) \
365 (enum enum_name)streamer_read_hwi_in_range ((ib), #enum_name, 0, \
366 (int)(enum_last) - 1)
370#define bp_pack_enum(bp,enum_name,enum_last,val) \
371 bp_pack_int_in_range ((bp), 0, (int)(enum_last) - 1, (int)(val))
375#define bp_unpack_enum(bp,enum_name,enum_last) \
376 (enum enum_name)bp_unpack_int_in_range ((bp), #enum_name, 0, \
377 (int)(enum_last) - 1)
Definition lto-streamer.h:745
C coeffs[N]
Definition poly-int.h:433
Definition value-range.h:759
Definition value-range.h:78
int64_t gcov_type
Definition coretypes.h:46
void lto_append_block(struct lto_output_stream *obs)
Definition data-streamer-out.cc:39
void bp_pack_real_value(struct bitpack_d *, const REAL_VALUE_TYPE *)
Definition data-streamer.cc:129
void streamer_write_poly_int64(struct output_block *, poly_int64)
Definition data-streamer-out.cc:238
const char * streamer_read_string(class data_in *, class lto_input_block *)
Definition data-streamer-in.cc:78
void streamer_write_bitpack(struct bitpack_d *bp)
Definition data-streamer.h:152
struct bitpack_d bitpack_create(struct lto_output_stream *s)
Definition data-streamer.h:101
wide_int streamer_read_wide_int(class lto_input_block *)
Definition data-streamer-in.cc:287
void streamer_write_widest_int(struct output_block *, const widest_int &)
Definition data-streamer-out.cc:483
void bp_pack_var_len_int(struct bitpack_d *, HOST_WIDE_INT)
Definition data-streamer.cc:62
void streamer_write_char_stream(struct lto_output_stream *obs, char c)
Definition data-streamer.h:253
static unsigned const BITS_PER_BITPACK_WORD
Definition data-streamer.h:30
struct bitpack_d streamer_read_bitpack(class lto_input_block *ib)
Definition data-streamer.h:162
poly_int64 streamer_read_poly_int64(class lto_input_block *)
Definition data-streamer-in.cc:193
const char * streamer_read_indexed_string(class data_in *, class lto_input_block *, unsigned int *)
Definition data-streamer-in.cc:68
void streamer_write_vrange(struct output_block *, const class vrange &)
void streamer_write_string_with_length(struct output_block *, struct lto_output_stream *, const char *, unsigned int, bool)
Definition data-streamer-out.cc:135
void streamer_write_poly_uint64(struct output_block *, poly_uint64)
Definition data-streamer-out.cc:229
enum LTO_tags streamer_read_record_start(class lto_input_block *ib)
Definition data-streamer.h:390
void bp_pack_int_in_range(struct bitpack_d *bp, HOST_WIDE_INT min, HOST_WIDE_INT max, HOST_WIDE_INT val)
Definition data-streamer.h:322
poly_int< NUM_POLY_INT_COEFFS, bitpack_word_t > bp_unpack_poly_value(struct bitpack_d *bp, unsigned nbits)
Definition data-streamer.h:244
void streamer_write_hwi_in_range(struct lto_output_stream *obs, HOST_WIDE_INT min, HOST_WIDE_INT max, HOST_WIDE_INT val)
Definition data-streamer.h:283
const char * bp_unpack_string(class data_in *, struct bitpack_d *)
Definition data-streamer-in.cc:107
void streamer_write_uhwi(struct output_block *, unsigned HOST_WIDE_INT)
Definition data-streamer-out.cc:212
void bp_unpack_real_value(struct bitpack_d *, REAL_VALUE_TYPE *)
Definition data-streamer.cc:144
void bp_pack_string(struct output_block *, struct bitpack_d *, const char *, bool)
Definition data-streamer-out.cc:189
void streamer_write_string(struct output_block *, struct lto_output_stream *, const char *, bool)
Definition data-streamer-out.cc:154
HOST_WIDE_INT streamer_read_hwi(class lto_input_block *)
Definition data-streamer-in.cc:160
void bp_pack_value(struct bitpack_d *bp, bitpack_word_t val, unsigned nbits)
Definition data-streamer.h:112
void bp_pack_string_with_length(struct output_block *, struct bitpack_d *, const char *, unsigned int, bool)
Definition data-streamer-out.cc:173
void bp_pack_var_len_unsigned(struct bitpack_d *, unsigned HOST_WIDE_INT)
Definition data-streamer.cc:43
void streamer_write_gcov_count(struct output_block *, gcov_type)
Definition data-streamer-out.cc:247
unsigned HOST_WIDE_INT streamer_read_uhwi(class lto_input_block *)
Definition data-streamer-in.cc:125
void streamer_write_hwi_stream(struct lto_output_stream *, HOST_WIDE_INT)
Definition data-streamer-out.cc:305
void streamer_write_uhwi_stream(struct lto_output_stream *, unsigned HOST_WIDE_INT)
Definition data-streamer-out.cc:255
void streamer_write_record_start(struct output_block *ob, enum LTO_tags tag)
Definition data-streamer.h:382
void streamer_write_gcov_count_stream(struct lto_output_stream *, gcov_type)
Definition data-streamer-out.cc:362
poly_uint64 streamer_read_poly_uint64(class lto_input_block *)
Definition data-streamer-in.cc:184
void streamer_read_value_range(class lto_input_block *, class data_in *, class value_range &)
Definition data-streamer-in.cc:218
const char * bp_unpack_indexed_string(class data_in *, struct bitpack_d *, unsigned int *)
Definition data-streamer-in.cc:97
void streamer_write_wide_int(struct output_block *, const wide_int &)
Definition data-streamer-out.cc:470
gcov_type streamer_read_gcov_count(class lto_input_block *)
Definition data-streamer-in.cc:202
unsigned host_num_poly_int_coeffs
bitpack_word_t bp_unpack_value(struct bitpack_d *bp, unsigned nbits)
Definition data-streamer.h:173
#define streamer_read_enum(ib, enum_name, enum_last)
Definition data-streamer.h:364
void streamer_write_zero(struct output_block *)
Definition data-streamer-out.cc:203
poly_int< NUM_POLY_INT_COEFFS, C > poly_int_read_common(F read_coeff, Args ...args)
Definition data-streamer.h:202
HOST_WIDE_INT bp_unpack_int_in_range(struct bitpack_d *bp, const char *purpose, HOST_WIDE_INT min, HOST_WIDE_INT max)
Definition data-streamer.h:341
void streamer_write_hwi(struct output_block *, HOST_WIDE_INT)
Definition data-streamer-out.cc:221
void bp_pack_poly_value(struct bitpack_d *bp, const poly_int< NUM_POLY_INT_COEFFS, bitpack_word_t > &val, unsigned nbits)
Definition data-streamer.h:142
void streamer_write_data_stream(struct lto_output_stream *, const void *, size_t)
Definition data-streamer-out.cc:371
unsigned HOST_WIDE_INT bp_unpack_var_len_unsigned(struct bitpack_d *)
Definition data-streamer.cc:85
unsigned char streamer_read_uchar(class lto_input_block *ib)
Definition data-streamer.h:271
widest_int streamer_read_widest_int(class lto_input_block *)
Definition data-streamer-in.cc:304
HOST_WIDE_INT streamer_read_hwi_in_range(class lto_input_block *ib, const char *purpose, HOST_WIDE_INT min, HOST_WIDE_INT max)
Definition data-streamer.h:301
HOST_WIDE_INT bp_unpack_var_len_int(struct bitpack_d *)
Definition data-streamer.cc:105
#define streamer_write_enum(obs, enum_name, enum_last, val)
Definition data-streamer.h:359
unsigned HOST_WIDE_INT bitpack_word_t
Definition data-streamer.h:32
void void void void fatal_error(location_t, const char *,...) ATTRIBUTE_GCC_DIAG(2
#define NUM_POLY_INT_COEFFS
Definition genmodes.cc:859
int floor_log2(unsigned HOST_WIDE_INT x)
Definition hwint.cc:36
#define HOST_BITS_PER_WIDE_INT
Definition hwint.h:53
void lto_value_range_error(const char *purpose, HOST_WIDE_INT val, HOST_WIDE_INT min, HOST_WIDE_INT max)
Definition lto-section-in.cc:468
void lto_section_overrun(class lto_input_block *ib)
Definition lto-section-in.cc:459
LTO_tags
Definition lto-streamer.h:134
@ LTO_NUM_TAGS
Definition lto-streamer.h:193
i
Definition poly-int.h:776
#define REAL_VALUE_TYPE
Definition real.h:68
Definition data-streamer.h:35
void * stream
Definition data-streamer.h:43
bitpack_word_t word
Definition data-streamer.h:40
unsigned pos
Definition data-streamer.h:37
Definition lto-streamer.h:622
unsigned int total_size
Definition lto-streamer.h:639
unsigned int left_in_block
Definition lto-streamer.h:633
char * current_pointer
Definition lto-streamer.h:630
Definition lto-streamer.h:698
struct lto_output_stream * main_stream
Definition lto-streamer.h:703
#define gcc_assert(EXPR)
Definition system.h:821
#define gcc_checking_assert(EXPR)
Definition system.h:828