diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-08-01 14:59:51 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-08-01 14:59:51 +0000 |
commit | 211cd1e2358d52d3863f727b650c65650dd5ce89 (patch) | |
tree | 476a8a7f646d5bbc213770789b6a60427671b4fb /gcc/tree-vect-data-refs.c | |
parent | b0b45e582f31b496ea37a76a20b1f79b25165635 (diff) | |
download | gcc-211cd1e2358d52d3863f727b650c65650dd5ce89.zip gcc-211cd1e2358d52d3863f727b650c65650dd5ce89.tar.gz gcc-211cd1e2358d52d3863f727b650c65650dd5ce89.tar.bz2 |
[04/11] Add a vect_orig_stmt helper function
This patch just adds a helper function for going from a potential
pattern statement to the original scalar statement.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-vectorizer.h (vect_orig_stmt): New function.
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
* tree-vect-loop.c (vect_model_reduction_cost): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_live_operation): Likewise.
* tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
(vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
* tree-vect-stmts.c (vectorizable_call): Likewise.
(vectorizable_simd_clone_call, vect_remove_stores): Likewise.
From-SVN: r263217
Diffstat (limited to 'gcc/tree-vect-data-refs.c')
-rw-r--r-- | gcc/tree-vect-data-refs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 2158bf4..1f09bd5 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -214,10 +214,8 @@ vect_preserves_scalar_order_p (dr_vec_info *dr_info_a, dr_vec_info *dr_info_b) (but could happen later) while reads will happen no later than their current position (but could happen earlier). Reordering is therefore only possible if the first access is a write. */ - if (is_pattern_stmt_p (stmtinfo_a)) - stmtinfo_a = STMT_VINFO_RELATED_STMT (stmtinfo_a); - if (is_pattern_stmt_p (stmtinfo_b)) - stmtinfo_b = STMT_VINFO_RELATED_STMT (stmtinfo_b); + stmtinfo_a = vect_orig_stmt (stmtinfo_a); + stmtinfo_b = vect_orig_stmt (stmtinfo_b); stmt_vec_info earlier_stmt_info = get_earlier_stmt (stmtinfo_a, stmtinfo_b); return !DR_IS_WRITE (STMT_VINFO_DATA_REF (earlier_stmt_info)); } |