diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-11-14 14:55:12 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-11-14 14:55:12 +0000 |
commit | 10116ec1c147a76522cafba6b6a5b4ed1cb37b77 (patch) | |
tree | 776dc1f9e2372ad4300b7120c178f4dfc3c7121a /gcc/doc | |
parent | e8738f4e9686203451fd11f05b268b8a31b95ebd (diff) | |
download | gcc-10116ec1c147a76522cafba6b6a5b4ed1cb37b77.zip gcc-10116ec1c147a76522cafba6b6a5b4ed1cb37b77.tar.gz gcc-10116ec1c147a76522cafba6b6a5b4ed1cb37b77.tar.bz2 |
Pass the data vector mode to get_mask_mode
This patch passes the data vector mode to get_mask_mode, rather than its
size and nunits. This is a bit simpler and allows targets to distinguish
between modes that happen to have the same size and number of elements.
2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* target.def (get_mask_mode): Take a vector mode itself as argument,
instead of properties about the vector mode.
* doc/tm.texi: Regenerate.
* targhooks.h (default_get_mask_mode): Update to reflect new
get_mode_mask interface.
* targhooks.c (default_get_mask_mode): Likewise. Use
related_int_vector_mode.
* optabs-query.c (can_vec_mask_load_store_p): Update call
to get_mask_mode.
* tree-vect-stmts.c (check_load_store_masking): Likewise, checking
first that the original mode really is a vector.
* tree.c (build_truth_vector_type_for): Likewise.
* config/aarch64/aarch64.c (aarch64_get_mask_mode): Update for new
get_mode_mask interface.
(aarch64_expand_sve_vcond): Update call accordingly.
* config/gcn/gcn.c (gcn_vectorize_get_mask_mode): Update for new
get_mode_mask interface.
* config/i386/i386.c (ix86_get_mask_mode): Likewise.
From-SVN: r278233
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/tm.texi | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 5586e2e..3da1d65 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -6045,16 +6045,16 @@ requested mode, returning a mode with the same size as @var{vector_mode} when @var{nunits} is zero. This is the correct behavior for most targets. @end deftypefn -@deftypefn {Target Hook} opt_machine_mode TARGET_VECTORIZE_GET_MASK_MODE (poly_uint64 @var{nunits}, poly_uint64 @var{length}) -A vector mask is a value that holds one boolean result for every element -in a vector. This hook returns the machine mode that should be used to -represent such a mask when the vector in question is @var{length} bytes -long and contains @var{nunits} elements. The hook returns an empty -@code{opt_machine_mode} if no such mode exists. - -The default implementation returns the mode of an integer vector that -is @var{length} bytes long and that contains @var{nunits} elements, -if such a mode exists. +@deftypefn {Target Hook} opt_machine_mode TARGET_VECTORIZE_GET_MASK_MODE (machine_mode @var{mode}) +Return the mode to use for a vector mask that holds one boolean +result for each element of vector mode @var{mode}. The returned mask mode +can be a vector of integers (class @code{MODE_VECTOR_INT}), a vector of +booleans (class @code{MODE_VECTOR_BOOL}) or a scalar integer (class +@code{MODE_INT}). Return an empty @code{opt_machine_mode} if no such +mask mode exists. + +The default implementation returns a @code{MODE_VECTOR_INT} with the +same size and number of elements as @var{mode}, if such a mode exists. @end deftypefn @deftypefn {Target Hook} bool TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE (unsigned @var{ifn}) |