On Thu, Dec 19, 2013 at 12:51:43PM +0100, Thomas Schwinge wrote:
> OK for gomp-4_0-branch, and trunk (without the first hunk, obviously)?
> 
> commit 1f4dbb1842804b39c3b7ac1e80783734516dc965
> Author: Thomas Schwinge <tho...@codesourcery.com>
> Date:   Thu Dec 19 12:41:21 2013 +0100
> 
>     Add clobber for object, after last use.
>     
>       gcc/
>       * omp-low.c (lower_oacc_parallel, lower_omp_target): Add clobber
>       for sizes array, after last use.

Sure.
> --- gcc/omp-low.c
> +++ gcc/omp-low.c
> @@ -8917,6 +8917,13 @@ lower_oacc_parallel (gimple_stmt_iterator *gsi_p, 
> omp_context *ctx)
>                                       TREE_VEC_ELT (t, 1)),
>                               &initlist, true, NULL_TREE);
>         gimple_seq_add_seq (&ilist, initlist);
> +
> +       tree clobber = build_constructor (TREE_TYPE (TREE_VEC_ELT (t, 1)),
> +                                         NULL);
> +       TREE_THIS_VOLATILE (clobber) = 1;
> +       gimple_seq_add_stmt (&olist,
> +                            gimple_build_assign (TREE_VEC_ELT (t, 1),
> +                                                 clobber));
>       }
>  
>        tree clobber = build_constructor (ctx->record_type, NULL);
> @@ -10412,6 +10419,13 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, 
> omp_context *ctx)
>                                       TREE_VEC_ELT (t, 1)),
>                               &initlist, true, NULL_TREE);
>         gimple_seq_add_seq (&ilist, initlist);
> +
> +       tree clobber = build_constructor (TREE_TYPE (TREE_VEC_ELT (t, 1)),
> +                                         NULL);
> +       TREE_THIS_VOLATILE (clobber) = 1;
> +       gimple_seq_add_stmt (&olist,
> +                            gimple_build_assign (TREE_VEC_ELT (t, 1),
> +                                                 clobber));
>       }
>  
>        tree clobber = build_constructor (ctx->record_type, NULL);
> 
> 

        Jakub

Reply via email to