aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorKewen Lin <linkw@gcc.gnu.org>2020-06-03 17:15:14 +0800
committerKewen Lin <linkw@linux.ibm.com>2020-06-11 03:26:42 -0500
commit042f4082979aa22e08c008ed4c5b4bab3915a9c2 (patch)
treea5de78d0a2e113b7c07db9bd5912d66c0da75edd /gcc/tree-vectorizer.h
parent8ff57396d6dea4976b05902919070aa0e562354d (diff)
downloadgcc-042f4082979aa22e08c008ed4c5b4bab3915a9c2.zip
gcc-042f4082979aa22e08c008ed4c5b4bab3915a9c2.tar.gz
gcc-042f4082979aa22e08c008ed4c5b4bab3915a9c2.tar.bz2
vect: Rename can_fully_mask_p to can_use_partial_vectors_p
Power supports vector memory access with length (in bytes) instructions. Like existing fully masking for SVE, it is another approach to vectorize the loop using partially-populated vectors. As Richard Sandiford pointed out, we should extend the existing flag can_fully_mask_p to be more generic, to indicate whether we have any chances with partial vectors for this loop. So this patch is to rename this flag to can_use_partial_vectors_p to be more meaningful, also rename the macro LOOP_VINFO_CAN_FULLY_MASK_P to LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P. Bootstrapped/regtested on aarch64-linux-gnu. gcc/ChangeLog: * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Rename can_fully_mask_p to can_use_partial_vectors_p. (vect_analyze_loop_2): Rename LOOP_VINFO_CAN_FULLY_MASK_P to LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P. Rename saved_can_fully_mask_p to saved_can_use_partial_vectors_p. (vectorizable_reduction): Rename LOOP_VINFO_CAN_FULLY_MASK_P to LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P. (vectorizable_live_operation): Likewise. * tree-vect-stmts.c (permute_vec_elements): Likewise. (check_load_store_masking): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. * tree-vectorizer.h (LOOP_VINFO_CAN_FULLY_MASK_P): Renamed to ... (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P): ... this. (_loop_vec_info): Rename can_fully_mask_p to can_use_partial_vectors_p.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 14f68f7..c459280 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -631,8 +631,11 @@ public:
/* Is the loop vectorizable? */
bool vectorizable;
- /* Records whether we still have the option of using a fully-masked loop. */
- bool can_fully_mask_p;
+ /* Records whether we still have the option of vectorizing this loop
+ using partially-populated vectors; in other words, whether it is
+ still possible for one iteration of the vector loop to handle
+ fewer than VF scalars. */
+ bool can_use_partial_vectors_p;
/* True if have decided to use a fully-masked loop. */
bool fully_masked_p;
@@ -698,7 +701,7 @@ public:
#define LOOP_VINFO_COST_MODEL_THRESHOLD(L) (L)->th
#define LOOP_VINFO_VERSIONING_THRESHOLD(L) (L)->versioning_threshold
#define LOOP_VINFO_VECTORIZABLE_P(L) (L)->vectorizable
-#define LOOP_VINFO_CAN_FULLY_MASK_P(L) (L)->can_fully_mask_p
+#define LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P(L) (L)->can_use_partial_vectors_p
#define LOOP_VINFO_FULLY_MASKED_P(L) (L)->fully_masked_p
#define LOOP_VINFO_VECT_FACTOR(L) (L)->vectorization_factor
#define LOOP_VINFO_MAX_VECT_FACTOR(L) (L)->max_vectorization_factor