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: [tuples] remove GIMPLE_MODIFY_STMT


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


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