diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2021-05-10 22:13:27 -0500 |
---|---|---|
committer | Kewen Lin <linkw@linux.ibm.com> | 2021-05-11 00:09:27 -0500 |
commit | 096f8215d2172ca4177cb26035e748d8f182fc8f (patch) | |
tree | e16da3ffb4a5a674682742234c5d47abc96e9d02 /gcc/tree-vectorizer.h | |
parent | b084bfd43a8b72d8db8702ff9cb316482662cb90 (diff) | |
download | gcc-096f8215d2172ca4177cb26035e748d8f182fc8f.zip gcc-096f8215d2172ca4177cb26035e748d8f182fc8f.tar.gz gcc-096f8215d2172ca4177cb26035e748d8f182fc8f.tar.bz2 |
vect: Add costing_for_scalar parameter to init_cost hook
rs6000 port function rs6000_density_test wants to differentiate the
current cost model is for the scalar version of a loop or block, or
the vector version. As Richi suggested, this patch introduces one
new parameter costing_for_scalar to init_cost hook to pass down this
information explicitly.
gcc/ChangeLog:
* doc/tm.texi: Regenerated.
* target.def (init_cost): Add new parameter costing_for_scalar.
* targhooks.c (default_init_cost): Adjust for new parameter.
* targhooks.h (default_init_cost): Likewise.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
(vect_compute_single_scalar_iteration_cost): Likewise.
(vect_analyze_loop_2): Likewise.
* tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
(vect_bb_vectorization_profitable_p): Likewise.
* tree-vectorizer.h (init_cost): Likewise.
* config/aarch64/aarch64.c (aarch64_init_cost): Likewise.
* config/i386/i386.c (ix86_init_cost): Likewise.
* config/rs6000/rs6000.c (rs6000_init_cost): Likewise.
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 9861d9e..8d1ffaf 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1455,9 +1455,9 @@ int vect_get_stmt_cost (enum vect_cost_for_stmt type_of_cost) /* Alias targetm.vectorize.init_cost. */ static inline void * -init_cost (class loop *loop_info) +init_cost (class loop *loop_info, bool costing_for_scalar) { - return targetm.vectorize.init_cost (loop_info); + return targetm.vectorize.init_cost (loop_info, costing_for_scalar); } extern void dump_stmt_cost (FILE *, void *, int, enum vect_cost_for_stmt, |