aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 97caf61..01d19c7 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -818,6 +818,11 @@ public:
elements that should be false in the first mask). */
tree mask_skip_niters;
+ /* If we are using a loop mask to align memory addresses and we're in an
+ early break loop then this variable contains the number of elements that
+ were skipped during the initial iteration of the loop. */
+ tree mask_skip_niters_pfa_offset;
+
/* The type that the loop control IV should be converted to before
testing which of the VF scalars are active and inactive.
Only meaningful if LOOP_VINFO_USING_PARTIAL_VECTORS_P. */
@@ -854,6 +859,9 @@ public:
/* The mask used to check the alignment of pointers or arrays. */
int ptr_mask;
+ /* Indicates whether the loop has any non-linear IV. */
+ bool nonlinear_iv;
+
/* Data Dependence Relations defining address ranges that are candidates
for a run-time aliasing check. */
auto_vec<ddr_p> may_alias_ddrs;
@@ -1064,6 +1072,7 @@ public:
#define LOOP_VINFO_MASKS(L) (L)->masks
#define LOOP_VINFO_LENS(L) (L)->lens
#define LOOP_VINFO_MASK_SKIP_NITERS(L) (L)->mask_skip_niters
+#define LOOP_VINFO_MASK_NITERS_PFA_OFFSET(L) (L)->mask_skip_niters_pfa_offset
#define LOOP_VINFO_RGROUP_COMPARE_TYPE(L) (L)->rgroup_compare_type
#define LOOP_VINFO_RGROUP_IV_TYPE(L) (L)->rgroup_iv_type
#define LOOP_VINFO_PARTIAL_VECTORS_STYLE(L) (L)->partial_vector_style
@@ -1073,6 +1082,7 @@ public:
#define LOOP_VINFO_DDRS(L) (L)->shared->ddrs
#define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters))
#define LOOP_VINFO_PEELING_FOR_ALIGNMENT(L) (L)->peeling_for_alignment
+#define LOOP_VINFO_NON_LINEAR_IV(L) (L)->nonlinear_iv
#define LOOP_VINFO_UNALIGNED_DR(L) (L)->unaligned_dr
#define LOOP_VINFO_MAY_MISALIGN_STMTS(L) (L)->may_misalign_stmts
#define LOOP_VINFO_MAY_ALIAS_DDRS(L) (L)->may_alias_ddrs
@@ -2138,8 +2148,14 @@ unlimited_cost_model (loop_p loop)
inline bool
vect_use_loop_mask_for_alignment_p (loop_vec_info loop_vinfo)
{
+ /* With early break vectorization we don't know whether the accesses will stay
+ inside the loop or not. TODO: The early break adjustment code can be
+ implemented the same way as vectorizable_linear_induction. However we
+ can't test this today so reject it. */
return (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)
- && LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo));
+ && LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo)
+ && !(LOOP_VINFO_NON_LINEAR_IV (loop_vinfo)
+ && LOOP_VINFO_EARLY_BREAKS (loop_vinfo)));
}
/* Return the number of vectors of type VECTYPE that are needed to get