This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] remove GIMPLE_MODIFY_STMT
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: dnovillo at google dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 14 Jul 2008 13:27:48 -0400
- Subject: Re: [tuples] remove GIMPLE_MODIFY_STMT
- References: <20080714163423.GA1865@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jul 14, 2008 at 12:34:23PM -0400, Aldy Hernandez wrote:
> * java/java-gimplify.c (java_gimplify_expr): Same.
> (java_gimplify_modify_expr): Same.
Separate ChangeLog (similarly fortran/, cp/).
> +/* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
> +
> + DST/SRC are the destination and source respectively. You can pass
> + ungimplified trees in DST or SRC, in which case they will be
> + converted to a gimple operand if necessary.
> +
> + This function returns the newly created GIMPLE_ASSIGN tuple. */
> +
> +static inline gimple
> +gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
> +{
> + /* FIXME tuples. Add smarts to build the GIMPLE_ASSIGN directly. */
> + extern void gimplify_and_add (tree, gimple_seq *);
> + tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
> + gimplify_and_add (t, seq_p);
You could ggc_free (t); here...
> + return gimple_seq_last_stmt (*seq_p);
> +}
> +
> +
And, wouldn't it be better to define this in tree-gimple.h, where
you already have gimplify_and_add prototype? Or define it out-of-line.
Last, the patch I've just committed will need minor adjustments for
the killing of GIMPLE_MODIFY_STMT in release_stmt_tree.
Jakub