aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-07-31 14:22:05 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-07-31 14:22:05 +0000
commite1bd72966309ac459a55e2bc64ad355272d402f5 (patch)
tree61ce73a63a79b56f77a39ccb07e013a49b8732aa /gcc/tree-vectorizer.h
parentfef96d8e2a370e826acdf914d51c88aa2657340a (diff)
downloadgcc-e1bd72966309ac459a55e2bc64ad355272d402f5.zip
gcc-e1bd72966309ac459a55e2bc64ad355272d402f5.tar.gz
gcc-e1bd72966309ac459a55e2bc64ad355272d402f5.tar.bz2
[12/46] Make vect_finish_stmt_generation return a stmt_vec_info
This patch makes vect_finish_replace_stmt and vect_finish_stmt_generation return the stmt_vec_info for the vectorised statement, so that the caller doesn't need a separate vinfo_for_stmt to get at it. This involved changing the structure of the statement-generating loops so that they use narrow scopes for the vectorised gimple statements and use the existing (wider) scopes for the associated stmt_vec_infos. This helps with gimple stmt->stmt_vec_info changes further down the line. The way we do this generation is another area ripe for clean-up, but that's too much of a rabbit-hole for this series. 2018-07-31 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info (vect_finish_stmt_generation): Likewise. * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise. (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise. (vect_build_gather_load_calls): Use the return value of the above functions instead of a separate call to vinfo_for_stmt. Use narrow scopes for the input gimple stmt and wider scopes for the associated stmt_vec_info. Use vec_info::lookup_def when setting these stmt_vec_infos from an SSA_NAME definition. (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call) (vect_create_vectorized_demotion_stmts, vectorizable_conversion) (vectorizable_assignment, vectorizable_shift, vectorizable_operation) (vectorizable_store, vectorizable_load, vectorizable_condition) (vectorizable_comparison): Likewise. * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise. (vectorizable_reduction): Likewise. From-SVN: r263127
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index e302d35..4109cd9 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -1548,9 +1548,9 @@ extern void free_stmt_vec_info (gimple *stmt);
extern unsigned record_stmt_cost (stmt_vector_for_cost *, int,
enum vect_cost_for_stmt, stmt_vec_info,
int, enum vect_cost_model_location);
-extern void vect_finish_replace_stmt (gimple *, gimple *);
-extern void vect_finish_stmt_generation (gimple *, gimple *,
- gimple_stmt_iterator *);
+extern stmt_vec_info vect_finish_replace_stmt (gimple *, gimple *);
+extern stmt_vec_info vect_finish_stmt_generation (gimple *, gimple *,
+ gimple_stmt_iterator *);
extern bool vect_mark_stmts_to_be_vectorized (loop_vec_info);
extern tree vect_get_store_rhs (gimple *);
extern tree vect_get_vec_def_for_operand_1 (gimple *, enum vect_def_type);