diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-13 17:59:40 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-13 17:59:40 +0000 |
commit | 76a34e3f8565e36d164006e62f7380bfe6057154 (patch) | |
tree | 5d7839c9d03b922ec19e0df424632405eecb1a18 /gcc/targhooks.h | |
parent | 535e7c114a7ad2ad7a6a0def88cf9448fcd5f029 (diff) | |
download | gcc-76a34e3f8565e36d164006e62f7380bfe6057154.zip gcc-76a34e3f8565e36d164006e62f7380bfe6057154.tar.gz gcc-76a34e3f8565e36d164006e62f7380bfe6057154.tar.bz2 |
Add an empty_mask_is_expensive hook
This patch adds a hook to control whether we avoid executing masked
(predicated) stores when the mask is all false. We don't want to do
that by default for SVE.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* target.def (empty_mask_is_expensive): New hook.
* doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
* doc/tm.texi: Regenerate.
* targhooks.h (default_empty_mask_is_expensive): Declare.
* targhooks.c (default_empty_mask_is_expensive): New function.
* tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
if the target says that empty masks are expensive.
* config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
New function.
(TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r256631
Diffstat (limited to 'gcc/targhooks.h')
-rw-r--r-- | gcc/targhooks.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/targhooks.h b/gcc/targhooks.h index f55fde7..eca35d2 100644 --- a/gcc/targhooks.h +++ b/gcc/targhooks.h @@ -111,6 +111,7 @@ extern machine_mode default_preferred_simd_mode (scalar_mode mode); extern machine_mode default_split_reduction (machine_mode); extern void default_autovectorize_vector_sizes (vector_sizes *); extern opt_machine_mode default_get_mask_mode (poly_uint64, poly_uint64); +extern bool default_empty_mask_is_expensive (unsigned); extern void *default_init_cost (struct loop *); extern unsigned default_add_stmt_cost (void *, int, enum vect_cost_for_stmt, struct _stmt_vec_info *, int, |