aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2021-11-10 12:31:00 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2021-11-10 12:31:00 +0000
commit4725f62789f25b17967695203d7ee821221e2dd6 (patch)
tree70d6cf997c830af45ee9f52bff0117776b850488 /gcc/tree-vectorizer.h
parentd70ef65692fced7ab72e0aceeff7407e5a34d96d (diff)
downloadgcc-4725f62789f25b17967695203d7ee821221e2dd6.zip
gcc-4725f62789f25b17967695203d7ee821221e2dd6.tar.gz
gcc-4725f62789f25b17967695203d7ee821221e2dd6.tar.bz2
vect: Move vector costs to loop_vec_info
target_cost_data is in vec_info but is really specific to loop_vec_info. This patch moves it there and renames it to vector_costs, to distinguish it from scalar target costs. gcc/ * tree-vectorizer.h (vec_info::target_cost_data): Replace with... (_loop_vec_info::vector_costs): ...this. (LOOP_VINFO_TARGET_COST_DATA): Delete. * tree-vectorizer.c (vec_info::vec_info): Remove target_cost_data initialization. (vec_info::~vec_info): Remove corresponding delete. * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize vector_costs to null. (_loop_vec_info::~_loop_vec_info): Delete vector_costs. (vect_analyze_loop_operations): Update after above changes. (vect_analyze_loop_2): Likewise. (vect_estimate_min_profitable_iters): Likewise. * tree-vect-slp.c (vect_slp_analyze_operations): Likewise.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 51ab218..58c296d 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -408,9 +408,6 @@ public:
stmt in the chain. */
auto_vec<stmt_vec_info> grouped_stores;
- /* Cost data used by the target cost model. */
- class vector_costs *target_cost_data;
-
/* The set of vector modes used in the vectorized region. */
mode_set used_vector_modes;
@@ -590,6 +587,9 @@ public:
/* Condition under which this loop is analyzed and versioned. */
tree num_iters_assumptions;
+ /* The cost of the vector code. */
+ class vector_costs *vector_costs;
+
/* Threshold of number of iterations below which vectorization will not be
performed. It is calculated from MIN_PROFITABLE_ITERS and
param_min_vect_loop_bound. */
@@ -843,7 +843,6 @@ public:
#define LOOP_VINFO_SLP_UNROLLING_FACTOR(L) (L)->slp_unrolling_factor
#define LOOP_VINFO_REDUCTIONS(L) (L)->reductions
#define LOOP_VINFO_REDUCTION_CHAINS(L) (L)->reduction_chains
-#define LOOP_VINFO_TARGET_COST_DATA(L) (L)->target_cost_data
#define LOOP_VINFO_PEELING_FOR_GAPS(L) (L)->peeling_for_gaps
#define LOOP_VINFO_PEELING_FOR_NITER(L) (L)->peeling_for_niter
#define LOOP_VINFO_NO_DATA_DEPENDENCIES(L) (L)->no_data_dependencies