This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Adjust gimple_build_assign* gimple.texi documentation
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: David Malcolm <dmalcolm at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 2 Dec 2014 10:46:02 +0100 (CET)
- Subject: Re: [PATCH] Adjust gimple_build_assign* gimple.texi documentation
- Authentication-results: sourceware.org; auth=none
- References: <20141202074924 dot GD1860 at tucnak dot redhat dot com>
On Tue, 2 Dec 2014, Jakub Jelinek wrote:
> Hi!
>
> Here is an attempt to adjust gimple_build_assign* documentation.
> Ok for trunk?
Ok.
Thanks,
Richard.
> Note, apparently the documentation has not been adjusted for
> the gimple -> gassign * etc. changes, David, can you please work on
> adjusting gimple.texi to match the reality after your changes?
>
> 2014-12-02 Jakub Jelinek <jakub@redhat.com>
>
> * doc/gimple.texi (gimple_build_assign_with_ops): Remove.
> (gimple_build_assign): Document the new overloads.
>
> --- gcc/doc/gimple.texi.jj 2014-11-20 17:06:24.000000000 +0100
> +++ gcc/doc/gimple.texi 2014-12-02 08:27:06.898386806 +0100
> @@ -1124,9 +1124,35 @@ already have a tree expression that you
> tuple. However, try to avoid building expression trees for the
> sole purpose of calling this function. If you already have the
> operands in separate trees, it is better to use
> -@code{gimple_build_assign_with_ops}.
> +@code{gimple_build_assign} with @code{enum tree_code} argument and separate
> +arguments for each operand.
> @end deftypefn
>
> +@deftypefn {GIMPLE function} gimple gimple_build_assign @
> +(tree lhs, enum tree_code subcode, tree op1, tree op2, tree op3)
> +This function is similar to two operand @code{gimple_build_assign},
> +but is used to build a @code{GIMPLE_ASSIGN} statement when the operands of the
> +right-hand side of the assignment are already split into
> +different operands.
> +
> +The left-hand side is an lvalue passed in lhs. Subcode is the
> +@code{tree_code} for the right-hand side of the assignment. Op1, op2 and op3
> +are the operands.
> +@end deftypefn
> +
> +@deftypefn {GIMPLE function} gimple gimple_build_assign @
> +(tree lhs, enum tree_code subcode, tree op1, tree op2)
> +Like the above 5 operand @code{gimple_build_assign}, but with the last
> +argument @code{NULL} - this overload should not be used for
> +@code{GIMPLE_TERNARY_RHS} assignments.
> +@end deftypefn
> +
> +@deftypefn {GIMPLE function} gimple gimple_build_assign @
> +(tree lhs, enum tree_code subcode, tree op1)
> +Like the above 4 operand @code{gimple_build_assign}, but with the last
> +argument @code{NULL} - this overload should be used only for
> +@code{GIMPLE_UNARY_RHS} and @code{GIMPLE_SINGLE_RHS} assignments.
> +@end deftypefn
>
> @deftypefn {GIMPLE function} gimple gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
> Build a new @code{GIMPLE_ASSIGN} tuple and append it to the end of
> @@ -1139,19 +1165,6 @@ case they will be converted to a gimple
>
> This function returns the newly created @code{GIMPLE_ASSIGN} tuple.
>
> -@deftypefn {GIMPLE function} gimple gimple_build_assign_with_ops @
> -(enum tree_code subcode, tree lhs, tree op1, tree op2)
> -This function is similar to @code{gimple_build_assign}, but is used to
> -build a @code{GIMPLE_ASSIGN} statement when the operands of the
> -right-hand side of the assignment are already split into
> -different operands.
> -
> -The left-hand side is an lvalue passed in lhs. Subcode is the
> -@code{tree_code} for the right-hand side of the assignment. Op1 and op2
> -are the operands. If op2 is null, subcode must be a @code{tree_code}
> -for a unary expression.
> -@end deftypefn
> -
> @deftypefn {GIMPLE function} {enum tree_code} gimple_assign_rhs_code (gimple g)
> Return the code of the expression computed on the @code{RHS} of
> assignment statement @code{G}.
>
> Jakub
>
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284
(AG Nuernberg)
Maxfeldstrasse 5, 90409 Nuernberg, Germany