aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.ibm.com>2012-06-14 12:21:36 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2012-06-14 12:21:36 +0000
commitb6cef4e04d49e6d7ae7b6b6db19dc9162b7c2a53 (patch)
treea0aed9af70716fc07eefe673995535d93b3c99a5 /gcc/tree-vectorizer.h
parentdf3781485406ededf60d901bbcbbcbeeaf0529b9 (diff)
downloadgcc-b6cef4e04d49e6d7ae7b6b6db19dc9162b7c2a53.zip
gcc-b6cef4e04d49e6d7ae7b6b6db19dc9162b7c2a53.tar.gz
gcc-b6cef4e04d49e6d7ae7b6b6db19dc9162b7c2a53.tar.bz2
tree-vectorizer.h (vect_get_stmt_cost): Move from tree-vect-stmts.c.
2012-06-14 Bill Schmidt <wschmidt@linux.ibm.com> * tree-vectorizer.h (vect_get_stmt_cost): Move from tree-vect-stmts.c. (cost_for_stmt): Remove decl. (vect_get_single_scalar_iteration_cost): Correct typo in name. * tree-vect-loop.c (vect_get_cost): Remove. (vect_get_single_scalar_iteration_cost): Correct typo in name; use vect_get_stmt_cost rather than vect_get_cost. (vect_get_known_peeling_cost): Use vect_get_stmt_cost rather than vect_get_cost. (vect_estimate_min_profitable_iters): Correct typo in call to vect_get_single_scalar_iteration_cost; use vect_get_stmt_cost rather than vect_get_cost. (vect_model_reduction_cost): Use vect_get_stmt_cost rather than vect_get_cost. (vect_model_induction_cost): Likewise. * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): Correct typo in call to vect_get_single_scalar_iteration_cost. * tree-vect-stmts.c (vect_get_stmt_cost): Move to tree-vectorizer.h. (cost_for_stmt): Remove unnecessary function. * Makefile.in (TREE_VECTORIZER_H): Update dependencies. From-SVN: r188611
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index e8ca7cb..4c5ea36 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#define GCC_TREE_VECTORIZER_H
#include "tree-data-ref.h"
+#include "target.h"
typedef source_location LOC;
#define UNKNOWN_LOC UNKNOWN_LOCATION
@@ -769,6 +770,18 @@ vect_pow2 (int x)
return res;
}
+/* Get cost by calling cost target builtin. */
+
+static inline
+int vect_get_stmt_cost (enum vect_cost_for_stmt type_of_cost)
+{
+ tree dummy_type = NULL;
+ int dummy = 0;
+
+ return targetm.vectorize.builtin_vectorization_cost (type_of_cost,
+ dummy_type, dummy);
+}
+
/*-----------------------------------------------------------------*/
/* Info on data references alignment. */
/*-----------------------------------------------------------------*/
@@ -843,7 +856,6 @@ extern void vect_model_load_cost (stmt_vec_info, int, bool, slp_tree);
extern void vect_finish_stmt_generation (gimple, gimple,
gimple_stmt_iterator *);
extern bool vect_mark_stmts_to_be_vectorized (loop_vec_info);
-extern int cost_for_stmt (gimple);
extern tree vect_get_vec_def_for_operand (tree, gimple, tree *);
extern tree vect_init_vector (gimple, tree, tree,
gimple_stmt_iterator *);
@@ -919,7 +931,7 @@ extern int vect_estimate_min_profitable_iters (loop_vec_info);
extern tree get_initial_def_for_reduction (gimple, tree, tree *);
extern int vect_min_worthwhile_factor (enum tree_code);
extern int vect_get_known_peeling_cost (loop_vec_info, int, int *, int);
-extern int vect_get_single_scalar_iteraion_cost (loop_vec_info);
+extern int vect_get_single_scalar_iteration_cost (loop_vec_info);
/* In tree-vect-slp.c. */
extern void vect_free_slp_instance (slp_instance);