This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Summary: unreviewed hook doc patches



Gerald Pfeifer <gerald@pfeifer.com> wrote on 15/02/2010 03:30:05 AM:

> On Mon, 8 Feb 2010, Ira Rosen wrote:
> >> TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST,
> >> TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE,
> >> TARGET_VECTORIZE_BUILTIN_VEC_PERM,
> >> TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK
> >> http://gcc.gnu.org/ml/gcc-patches/2010-01/msg00775.html
>
> Based on Ira's review, this one (38/112) is fine, but please do look
> into a number of comments:

Sorry, I didn't check if all the arguments are documented.
I am adding their documentation here, so maybe Joern could add it to his
patch.

>
> +@deftypefn {Target Hook} int
> TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST (bool @var{runtime_test})
>
> +Returns the cost to be added to the overheads involved with executing
> +the vectorized version of a loop.
>
> "overhead", not "overheads", and I assume you'll want to document the
> parameter runtime_test, too?

Returns the cost to be added to the overhead involved with executing
the vectorized version of a loop in case run time test @var{runtime_test}
is performed.

>
> +@deftypefn {Target Hook} bool
TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE
> (const_tree @var{type}, bool @var{is_packed})
> +Return true if vector alignment is reachable (by peeling N iterations)
> for the given type.
> +@end deftypefn
>
> Here is_packed is not described, and where does N come from?

Returns true if vector alignment is reachable (by peeling several scalar
iterations)
for the given type, @var{is_packed} indicates if the memory access is
defined in a packed structure.

>
> +@deftypefn {Target Hook} bool TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK (tree

> @var{vec_type}, tree @var{mask})
> +Return true if a vector created for @code{builtin_vec_perm} is valid.
> +@end deftypefn
>
> Here vec_type and mask are not described.

Returns true if a vector created for @code{builtin_vec_perm} for the given
@var{vec_type} and @var{mask} is valid.


The patch:

Index: doc/tm.texi
===================================================================
--- doc/tm.texi (revision 156202)
+++ doc/tm.texi (working copy)
@@ -5678,6 +5678,28 @@
 @code{widen_mult_hi/lo} idioms will be used.
 @end deftypefn

+@deftypefn {Target Hook} int TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST
(bool @var{runtime_test})
+Returns the cost to be added to the overhead involved with executing
+the vectorized version of a loop in case run time test @var{runtime_test}
+is performed.
+@end deftypefn
+
+@deftypefn {Target Hook} bool TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE
(const_tree @var{type}, bool @var{is_packed})
+Returns true if vector alignment is reachable (by peeling several scalar
iterations)
+for the given type, @var{is_packed} indicates if the memory access is
defined
+in a packed structure.
+@end deftypefn
+
+@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_VEC_PERM (tree @var
{type}, tree *@var{mask_element_type})
+Target builtin that implements vector permute for the given @var{type}.
Returns
+the type of permutation mask in @var{mask_element_type}.
+@end deftypefn
+
+@deftypefn {Target Hook} bool TARGET_VECTORIZE_BUILTIN_VEC_PERM_OK (tree
@var{vec_type}, tree @var{mask})
+Returns true if a vector created for @code{builtin_vec_perm}  for given
the
+@var{vec_type} and @var{mask} is valid.
+@end deftypefn
+
 @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_CONVERSION (enum
tree_code @var{code}, tree @var{type})
 This hook should return the DECL of a function that implements conversion
of the
 input vector of type @var{type}.


>
> Your patch already improves the documentation, so I don't want to push
> strongly, but it would be nice if Ira and you could work this out.

Thanks,
Ira

>
> Gerald


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]