Commit 920e8172 by Richard Sandiford Committed by Richard Sandiford

tree-vectorizer.h (vect_create_data_ref_ptr): Add an extra type parameter.

gcc/
	* tree-vectorizer.h (vect_create_data_ref_ptr): Add an extra
	type parameter.
	* tree-vect-data-refs.c (vect_create_data_ref_ptr): Add an aggr_type
	parameter.  Generalise code to handle arrays as well as vectors.
	(vect_setup_realignment): Update accordingly.
	* tree-vect-stmts.c (vectorizable_store): Likewise.
	(vectorizable_load): Likewise.

From-SVN: r172423
parent 5ce1ee7f
2011-04-14 Richard Sandiford <richard.sandiford@linaro.org> 2011-04-14 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vectorizer.h (vect_create_data_ref_ptr): Add an extra
type parameter.
* tree-vect-data-refs.c (vect_create_data_ref_ptr): Add an aggr_type
parameter. Generalise code to handle arrays as well as vectors.
(vect_setup_realignment): Update accordingly.
* tree-vect-stmts.c (vectorizable_store): Likewise.
(vectorizable_load): Likewise.
2011-04-14 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-stmts.c (vectorizable_load): Allocate and free dr_chain * tree-vect-stmts.c (vectorizable_load): Allocate and free dr_chain
within the per-copy loop. within the per-copy loop.
......
...@@ -3581,9 +3581,9 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, ...@@ -3581,9 +3581,9 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
/* We should have catched mismatched types earlier. */ /* We should have catched mismatched types earlier. */
gcc_assert (useless_type_conversion_p (vectype, gcc_assert (useless_type_conversion_p (vectype,
TREE_TYPE (vec_oprnd))); TREE_TYPE (vec_oprnd)));
dataref_ptr = vect_create_data_ref_ptr (first_stmt, NULL, NULL_TREE, dataref_ptr = vect_create_data_ref_ptr (first_stmt, vectype, NULL,
&dummy, gsi, &ptr_incr, false, NULL_TREE, &dummy, gsi,
&inv_p); &ptr_incr, false, &inv_p);
gcc_assert (bb_vinfo || !inv_p); gcc_assert (bb_vinfo || !inv_p);
} }
else else
...@@ -4107,9 +4107,9 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, ...@@ -4107,9 +4107,9 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
{ {
/* 1. Create the vector pointer update chain. */ /* 1. Create the vector pointer update chain. */
if (j == 0) if (j == 0)
dataref_ptr = vect_create_data_ref_ptr (first_stmt, at_loop, offset, dataref_ptr = vect_create_data_ref_ptr (first_stmt, vectype, at_loop,
&dummy, gsi, &ptr_incr, false, offset, &dummy, gsi,
&inv_p); &ptr_incr, false, &inv_p);
else else
dataref_ptr = dataref_ptr =
bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE); bump_vector_ptr (dataref_ptr, ptr_incr, gsi, stmt, NULL_TREE);
......
...@@ -823,9 +823,9 @@ extern bool vect_verify_datarefs_alignment (loop_vec_info, bb_vec_info); ...@@ -823,9 +823,9 @@ extern bool vect_verify_datarefs_alignment (loop_vec_info, bb_vec_info);
extern bool vect_analyze_data_ref_accesses (loop_vec_info, bb_vec_info); extern bool vect_analyze_data_ref_accesses (loop_vec_info, bb_vec_info);
extern bool vect_prune_runtime_alias_test_list (loop_vec_info); extern bool vect_prune_runtime_alias_test_list (loop_vec_info);
extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *); extern bool vect_analyze_data_refs (loop_vec_info, bb_vec_info, int *);
extern tree vect_create_data_ref_ptr (gimple, struct loop *, tree, tree *, extern tree vect_create_data_ref_ptr (gimple, tree, struct loop *, tree,
gimple_stmt_iterator *, gimple *, tree *, gimple_stmt_iterator *,
bool, bool *); gimple *, bool, bool *);
extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree); extern tree bump_vector_ptr (tree, gimple, gimple_stmt_iterator *, gimple, tree);
extern tree vect_create_destination_var (tree, tree); extern tree vect_create_destination_var (tree, tree);
extern bool vect_strided_store_supported (tree); extern bool vect_strided_store_supported (tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment