static void lto_input_ts_vector_tree_pointers (struct lto_input_block *ib, struct data_in *data_in, tree expr) { unsigned i; for (i = 0; i < VECTOR_CST_NELTS (expr); ++i) VECTOR_CST_ELT (expr, i) = stream_read_tree (ib, data_in); }
static tree fold_const_reduction (tree type, tree arg, tree_code code) { unsigned HOST_WIDE_INT nelts; if (TREE_CODE (arg) != VECTOR_CST || !VECTOR_CST_NELTS (arg).is_constant (&nelts)) return NULL_TREE; tree res = VECTOR_CST_ELT (arg, 0); for (unsigned HOST_WIDE_INT i = 1; i < nelts; i++) { res = const_binop (code, type, res, VECTOR_CST_ELT (arg, i)); if (res == NULL_TREE || !CONSTANT_CLASS_P (res)) return NULL_TREE; } return res; }
static void write_ts_vector_tree_pointers (struct output_block *ob, tree expr, bool ref_p) { unsigned i; /* Note that the number of elements for EXPR has already been emitted in EXPR's header (see streamer_write_tree_header). */ for (i = 0; i < VECTOR_CST_NELTS (expr); ++i) stream_write_tree (ob, VECTOR_CST_ELT (expr, i), ref_p); }
static tree fold_const_fold_left (tree type, tree arg0, tree arg1, tree_code code) { if (TREE_CODE (arg1) != VECTOR_CST) return NULL_TREE; unsigned HOST_WIDE_INT nelts; if (!VECTOR_CST_NELTS (arg1).is_constant (&nelts)) return NULL_TREE; for (unsigned HOST_WIDE_INT i = 0; i < nelts; i++) { arg0 = const_binop (code, type, arg0, VECTOR_CST_ELT (arg1, i)); if (arg0 == NULL_TREE || !CONSTANT_CLASS_P (arg0)) return NULL_TREE; } return arg0; }