aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-09-05 19:57:47 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-09-05 19:57:47 +0000
commit3981fbb65a43dff3a81ebc32c94d6f86bb4f9783 (patch)
tree8affdf594e34f746a57a31d85951478c8b5be805 /gcc/doc
parent9da15d4097fa2fde5c2a5f1681db8fd04488a563 (diff)
downloadgcc-3981fbb65a43dff3a81ebc32c94d6f86bb4f9783.zip
gcc-3981fbb65a43dff3a81ebc32c94d6f86bb4f9783.tar.gz
gcc-3981fbb65a43dff3a81ebc32c94d6f86bb4f9783.tar.bz2
Make targetm.get_mask_mode return an opt_mode
...for consistency with mode_for_vector. 2017-09-05 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * target.def (get_mask_mode): Change return type to opt_mode. Expand commentary. * doc/tm.texi: Regenerate. * targhooks.h (default_get_mask_mode): Return an opt_mode. * targhooks.c (default_get_mask_mode): Likewise. * config/i386/i386.c (ix86_get_mask_mode): Likewise. * optabs-query.c (can_vec_mask_load_store_p): Update use of targetm.get_mask_mode. * tree.c (build_truth_vector_type): Likewise. From-SVN: r251731
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/tm.texi14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 2e22047..c29d249 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -5820,10 +5820,16 @@ mode returned by @code{TARGET_VECTORIZE_PREFERRED_SIMD_MODE}.
The default is zero which means to not iterate over other vector sizes.
@end deftypefn
-@deftypefn {Target Hook} machine_mode TARGET_VECTORIZE_GET_MASK_MODE (unsigned @var{nunits}, unsigned @var{length})
-This hook returns mode to be used for a mask to be used for a vector
-of specified @var{length} with @var{nunits} elements. By default an integer
-vector mode of a proper size is returned.
+@deftypefn {Target Hook} opt_machine_mode TARGET_VECTORIZE_GET_MASK_MODE (unsigned @var{nunits}, unsigned @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.
@end deftypefn
@deftypefn {Target Hook} {void *} TARGET_VECTORIZE_INIT_COST (struct loop *@var{loop_info})