diff options
author | Richard Biener <rguenther@suse.de> | 2024-11-04 13:09:21 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-11-07 13:50:19 +0100 |
commit | 2c25af0e52a631e46a1731594301e5e63bc28992 (patch) | |
tree | ee2dbb11732244085954e10cf6e136de33ed967b /gcc/tree-vectorizer.h | |
parent | 76048bd0693e30a5abc67aa6dcce9f4973ea208e (diff) | |
download | gcc-2c25af0e52a631e46a1731594301e5e63bc28992.zip gcc-2c25af0e52a631e46a1731594301e5e63bc28992.tar.gz gcc-2c25af0e52a631e46a1731594301e5e63bc28992.tar.bz2 |
Add LOOP_VINFO_DRS_ADVANCED_BY
The following remembers how we advanced DRs when vectorizing an
epilogue. When we want to vectorize the epilogue of such epilogue
we have to retain that advancement and add the advancement for this
vectorized epilogue. Due to the way we copy and re-associate
stmt_vec_infos and DRs recording this advancement and re-applying
it for the next epilogue is simplest.
* tree-vectorizer.h (_loop_vec_info::drs_advanced_by): New.
(LOOP_VINFO_DRS_ADVANCED_BY): Likewise.
* tree-vect-loop.cc (_loop_vec_info::_loop_vec_info): Initialize
drs_advanced_by.
(update_epilogue_loop_vinfo): Remember the DR advancement made.
(vect_transform_loop): Accumulate past advancements.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 24227a6..5a1bd23 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -994,6 +994,9 @@ public: analysis. */ vec<_loop_vec_info *> epilogue_vinfos; + /* If this is an epilogue loop the DR advancement applied. */ + tree drs_advanced_by; + /* The controlling loop IV for the current loop when vectorizing. This IV controls the natural exits of the loop. */ edge vec_loop_iv_exit; @@ -1097,6 +1100,7 @@ public: #define LOOP_VINFO_SIMD_IF_COND(L) (L)->simd_if_cond #define LOOP_VINFO_INNER_LOOP_COST_FACTOR(L) (L)->inner_loop_cost_factor #define LOOP_VINFO_INV_PATTERN_DEF_SEQ(L) (L)->inv_pattern_def_seq +#define LOOP_VINFO_DRS_ADVANCED_BY(L) (L)->drs_advanced_by #define LOOP_VINFO_FULLY_MASKED_P(L) \ (LOOP_VINFO_USING_PARTIAL_VECTORS_P (L) \ |