aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-06-22 10:44:02 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-06-22 10:44:02 +0000
commit6d098c572aef870f6a068d7e6697fde5a4ed2ccc (patch)
tree0e00bc071e7f538a73a3b51455376d755bd38499 /gcc/tree-vectorizer.h
parent606e3099e8fb81ab22e046421a6fe5a7338b2cd7 (diff)
downloadgcc-6d098c572aef870f6a068d7e6697fde5a4ed2ccc.zip
gcc-6d098c572aef870f6a068d7e6697fde5a4ed2ccc.tar.gz
gcc-6d098c572aef870f6a068d7e6697fde5a4ed2ccc.tar.bz2
tree-vectorizer.h (_loop_vec_info): Add scalar_cost_vec and single_scalar_iteration_cost members.
2015-06-22 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (_loop_vec_info): Add scalar_cost_vec and single_scalar_iteration_cost members. (LOOP_VINFO_SCALAR_ITERATION_COST): New. (LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST): Likewise. (vect_get_single_scalar_iteration_cost): Remove. * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): Use LOOP_VINFO_SCALAR_ITERATION_COST. * tree-vect-loop.c (destroy_loop_vec_info): Free scalar_cost_vec. (vect_get_single_scalar_iteration_cost): Compute result into LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST and LOOP_VINFO_SCALAR_ITERATION_COST. Make static. (vect_analyze_loop_2): Call vect_get_single_scalar_iteration_cost. (vect_estimate_min_profitable_iters): Use them. From-SVN: r224723
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index b7ce941..d3e788b 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -328,6 +328,12 @@ typedef struct _loop_vec_info {
/* Hash table used to choose the best peeling option. */
hash_table<peel_info_hasher> *peeling_htab;
+ /* Cost vector for a single scalar iteration. */
+ vec<stmt_info_for_cost> scalar_cost_vec;
+
+ /* Cost of a single scalar iteration. */
+ int single_scalar_iteration_cost;
+
/* Cost data used by the target cost model. */
void *target_cost_data;
@@ -406,6 +412,8 @@ typedef struct _loop_vec_info {
#define LOOP_VINFO_PEELING_FOR_NITER(L) (L)->peeling_for_niter
#define LOOP_VINFO_NO_DATA_DEPENDENCIES(L) (L)->no_data_dependencies
#define LOOP_VINFO_SCALAR_LOOP(L) (L)->scalar_loop
+#define LOOP_VINFO_SCALAR_ITERATION_COST(L) (L)->scalar_cost_vec
+#define LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST(L) (L)->single_scalar_iteration_cost
#define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \
((L)->may_misalign_stmts.length () > 0)
@@ -1101,8 +1109,6 @@ extern int vect_get_known_peeling_cost (loop_vec_info, int, int *,
stmt_vector_for_cost *,
stmt_vector_for_cost *,
stmt_vector_for_cost *);
-extern int vect_get_single_scalar_iteration_cost (loop_vec_info,
- stmt_vector_for_cost *);
/* In tree-vect-slp.c. */
extern void vect_free_slp_instance (slp_instance);