diff options
author | Richard Biener <rguenther@suse.de> | 2024-10-30 13:06:08 +0100 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-10-30 15:43:18 +0100 |
commit | 8f9348361c552e4e65ef7dc3e7788ce51a5b91c3 (patch) | |
tree | 731c11a263c59340a5c16143a5dbd328786a98ff /gcc/tree-vectorizer.h | |
parent | 875279ff3ee3b4135401286b8378087a24fd0f8d (diff) | |
download | gcc-8f9348361c552e4e65ef7dc3e7788ce51a5b91c3.zip gcc-8f9348361c552e4e65ef7dc3e7788ce51a5b91c3.tar.gz gcc-8f9348361c552e4e65ef7dc3e7788ce51a5b91c3.tar.bz2 |
Remove vectorizer finish_cost wrapper
The inline function wraps the vector_cost class API and no longer is
a good representation of the query style of that class which makes it
also difficult to extend.
* tree-vectorizer.h (finish_cost): Inline everywhere and remove.
* tree-vect-loop.cc (vect_estimate_min_profitable_iters):
Inline finish_cost.
* tree-vect-slp.cc (vect_bb_vectorization_profitable_p): Likewise.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index b51771f..24227a6 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1897,7 +1897,7 @@ extern void dump_stmt_cost (FILE *, int, enum vect_cost_for_stmt, stmt_vec_info, slp_tree, tree, int, unsigned, enum vect_cost_model_location); -/* Alias targetm.vectorize.add_stmt_cost. */ +/* Dump and add costs. */ inline unsigned add_stmt_cost (vector_costs *costs, int count, @@ -1923,8 +1923,6 @@ add_stmt_cost (vector_costs *costs, int count, enum vect_cost_for_stmt kind, return add_stmt_cost (costs, count, kind, NULL, NULL, NULL_TREE, 0, where); } -/* Alias targetm.vectorize.add_stmt_cost. */ - inline unsigned add_stmt_cost (vector_costs *costs, stmt_info_for_cost *i) { @@ -1932,21 +1930,6 @@ add_stmt_cost (vector_costs *costs, stmt_info_for_cost *i) i->vectype, i->misalign, i->where); } -/* Alias targetm.vectorize.finish_cost. */ - -inline void -finish_cost (vector_costs *costs, const vector_costs *scalar_costs, - unsigned *prologue_cost, unsigned *body_cost, - unsigned *epilogue_cost, unsigned *suggested_unroll_factor = NULL) -{ - costs->finish_cost (scalar_costs); - *prologue_cost = costs->prologue_cost (); - *body_cost = costs->body_cost (); - *epilogue_cost = costs->epilogue_cost (); - if (suggested_unroll_factor) - *suggested_unroll_factor = costs->suggested_unroll_factor (); -} - inline void add_stmt_costs (vector_costs *costs, stmt_vector_for_cost *cost_vec) { |