summaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-out.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-16 09:47:09 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-16 09:47:09 +0000
commitfadf62f4b9d615ed6a94be7cec091b02dd69cf8e (patch)
tree61b2d8308768796bdf3f7e0c34b84aa6cc0bae11 /gcc/tree-streamer-out.c
parente55b581dfa231b70aa01ea2b85758369f98386be (diff)
downloadgcc-fadf62f4b9d615ed6a94be7cec091b02dd69cf8e.tar.gz
2012-03-16 Richard Guenther <rguenther@suse.de>
* tree.h (TREE_VECTOR_CST_ELTS): Remove. (VECTOR_CST_NELTS, VECTOR_CST_ELTS, VECTOR_CST_ELT): New defines. (struct tree_vector): Remove elements member, add variable size elts array member. (build_vector_stat): Declare. (build_vector): Define in terms of build_vector_stat. * tree.c (build_vector): Rename to ... (build_vector_stat): ... this. Take array of trees as parameter. (build_vector_from_ctor): Adjust. (integer_zerop, integer_onep, integer_all_onesp, iterative_hash_expr, initializer_zerop): Adjust. * cfgexpand.c (expand_debug_expr): Likewise. * expr.c (categorize_ctor_elements_1, expand_expr_real_1, const_vector_from_tree): Likewise. * fold-const.c (const_binop, operand_equal_p, native_encode_vector, native_interpret_vector, fold_unary_loc, vec_cst_ctor_to_array, fold_vec_perm, fold_binary_loc, fold_ternary_loc): Likewise. * tree-streamer-in.c (streamer_alloc_tree): Handle TS_VECTOR. (lto_input_ts_vector_tree_pointers): Adjust. * tree-streamer-out.c (streamer_write_tree_header): Handle TS_VECTOR. (write_ts_vector_tree_pointers): Adjust. * varasm.c (const_hash_1, compare_constant, copy_constant, output_constant): Adjust. * gimple-fold.c (gimple_fold_stmt_to_constant_1): Adjust. * print-tree.c (print_node): Adjust. * tree-pretty-print.c (dump_generic_node): Adjust. * tree-vect-generic.c (uniform_vector_p, vector_element, lower_vec_perm): Adjust. * tree-vect-loop.c (get_initial_def_for_reduction): Adjust. * tree-vect-slp.c (vect_get_constant_vectors, vect_transform_slp_perm_load): Adjust. * tree-vect-stmts.c (vect_gen_perm_mask): Adjust. * expmed.c (make_tree): Adjust. * config/i386/i386.c (ix86_expand_builtin): Adjust. * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Adjust interface and implementation. (sparc_fold_builtin): Adjust. c-family/ * c-pretty-print.c (pp_c_initializer_list): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185458 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-streamer-out.c')
-rw-r--r--gcc/tree-streamer-out.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index c792fc2acf0..8fe7d7992c6 100644
--- a/gcc/tree-streamer-out.c
+++ b/gcc/tree-streamer-out.c
@@ -441,7 +441,11 @@ write_ts_common_tree_pointers (struct output_block *ob, tree expr, bool ref_p)
static void
write_ts_vector_tree_pointers (struct output_block *ob, tree expr, bool ref_p)
{
- streamer_write_chain (ob, TREE_VECTOR_CST_ELTS (expr), 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);
}
@@ -907,6 +911,8 @@ streamer_write_tree_header (struct output_block *ob, tree expr)
streamer_write_string_cst (ob, ob->main_stream, expr);
else if (CODE_CONTAINS_STRUCT (code, TS_IDENTIFIER))
write_identifier (ob, ob->main_stream, expr);
+ else if (CODE_CONTAINS_STRUCT (code, TS_VECTOR))
+ streamer_write_hwi (ob, VECTOR_CST_NELTS (expr));
else if (CODE_CONTAINS_STRUCT (code, TS_VEC))
streamer_write_hwi (ob, TREE_VEC_LENGTH (expr));
else if (CODE_CONTAINS_STRUCT (code, TS_BINFO))