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.h42
1 files changed, 27 insertions, 15 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 049e3dd..1388658 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -94,6 +94,7 @@ enum vect_reduction_type {
struct stmt_info_for_cost {
int count;
enum vect_cost_for_stmt kind;
+ enum vect_cost_model_location where;
gimple *stmt;
int misalign;
};
@@ -1171,6 +1172,9 @@ init_cost (struct loop *loop_info)
return targetm.vectorize.init_cost (loop_info);
}
+extern void dump_stmt_cost (FILE *, void *, int, enum vect_cost_for_stmt,
+ stmt_vec_info, int, enum vect_cost_model_location);
+
/* Alias targetm.vectorize.add_stmt_cost. */
static inline unsigned
@@ -1178,6 +1182,8 @@ add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind,
stmt_vec_info stmt_info, int misalign,
enum vect_cost_model_location where)
{
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ dump_stmt_cost (dump_file, data, count, kind, stmt_info, misalign, where);
return targetm.vectorize.add_stmt_cost (data, count, kind,
stmt_info, misalign, where);
}
@@ -1199,6 +1205,17 @@ destroy_cost_data (void *data)
targetm.vectorize.destroy_cost_data (data);
}
+inline void
+add_stmt_costs (void *data, stmt_vector_for_cost *cost_vec)
+{
+ stmt_info_for_cost *cost;
+ unsigned i;
+ FOR_EACH_VEC_ELT (*cost_vec, i, cost)
+ add_stmt_cost (data, cost->count, cost->kind,
+ cost->stmt ? vinfo_for_stmt (cost->stmt) : NULL,
+ cost->misalign, cost->where);
+}
+
/*-----------------------------------------------------------------*/
/* Info on data references alignment. */
/*-----------------------------------------------------------------*/
@@ -1422,16 +1439,6 @@ extern bool supportable_narrowing_operation (enum tree_code, tree, tree,
int *, vec<tree> *);
extern stmt_vec_info new_stmt_vec_info (gimple *stmt, vec_info *);
extern void free_stmt_vec_info (gimple *stmt);
-extern void vect_model_simple_cost (stmt_vec_info, int, enum vect_def_type *,
- int, stmt_vector_for_cost *,
- stmt_vector_for_cost *);
-extern void vect_model_store_cost (stmt_vec_info, int, vect_memory_access_type,
- vec_load_store_type, slp_tree,
- stmt_vector_for_cost *,
- stmt_vector_for_cost *);
-extern void vect_model_load_cost (stmt_vec_info, int, vect_memory_access_type,
- slp_tree, stmt_vector_for_cost *,
- stmt_vector_for_cost *);
extern unsigned record_stmt_cost (stmt_vector_for_cost *, int,
enum vect_cost_for_stmt, stmt_vec_info,
int, enum vect_cost_model_location);
@@ -1452,9 +1459,11 @@ extern tree vect_get_vec_def_for_stmt_copy (enum vect_def_type, tree);
extern bool vect_transform_stmt (gimple *, gimple_stmt_iterator *,
bool *, slp_tree, slp_instance);
extern void vect_remove_stores (gimple *);
-extern bool vect_analyze_stmt (gimple *, bool *, slp_tree, slp_instance);
+extern bool vect_analyze_stmt (gimple *, bool *, slp_tree, slp_instance,
+ stmt_vector_for_cost *);
extern bool vectorizable_condition (gimple *, gimple_stmt_iterator *,
- gimple **, tree, int, slp_tree);
+ gimple **, tree, int, slp_tree,
+ stmt_vector_for_cost *);
extern void vect_get_load_cost (struct data_reference *, int, bool,
unsigned int *, unsigned int *,
stmt_vector_for_cost *,
@@ -1539,11 +1548,14 @@ extern tree vect_get_loop_mask (gimple_stmt_iterator *, vec_loop_masks *,
extern struct loop *vect_transform_loop (loop_vec_info);
extern loop_vec_info vect_analyze_loop_form (struct loop *);
extern bool vectorizable_live_operation (gimple *, gimple_stmt_iterator *,
- slp_tree, int, gimple **);
+ slp_tree, int, gimple **,
+ stmt_vector_for_cost *);
extern bool vectorizable_reduction (gimple *, gimple_stmt_iterator *,
- gimple **, slp_tree, slp_instance);
+ gimple **, slp_tree, slp_instance,
+ stmt_vector_for_cost *);
extern bool vectorizable_induction (gimple *, gimple_stmt_iterator *,
- gimple **, slp_tree);
+ gimple **, slp_tree,
+ stmt_vector_for_cost *);
extern tree get_initial_def_for_reduction (gimple *, tree, tree *);
extern bool vect_worthwhile_without_simd_p (vec_info *, tree_code);
extern int vect_get_known_peeling_cost (loop_vec_info, int, int *,