[gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

Jakub Jelinek jakub@redhat.com
Tue Jun 23 15:04:00 GMT 2015


On Tue, Jun 23, 2015 at 05:54:48PM +0300, Ilya Verbin wrote:
> On Tue, Jun 23, 2015 at 13:51:39 +0200, Jakub Jelinek wrote:
> > > +      /* Set dd on target to 0 for the further check.  */
> > > +      #pragma omp target map(always to: dd)
> > > +	{ dd; }
> > 
> > This reminds me that:
> >           if (ctx->region_type == ORT_TARGET && !(n->value & GOVD_SEEN))
> >             remove = true;
> > in gimplify.c is not what we want, if it is has GOMP_MAP_KIND_ALWAYS,
> > then we shouldn't remove it even when it is not mentioned inside of the
> > region's body, because it then has side-effects.
> 
> OK for gomp-4_1-branch?
> 
> 
> gcc/
> 	* gimplify.c (gimplify_adjust_omp_clauses): Don't remove map clause if
> 	it has map-type-modifier always.
> libgomp/
> 	* testsuite/libgomp.c/target-11.c (main): Remove dd from target region.

GOMP_MAP_RELEASE uses the GOMP_MAP_FLAG_ALWAYS for something different from
always, because always release and always delete is not meaningful.
But as neither release nor delete can appear on map clause in target region,
it doesn't matter (at least for now).
So the patch is ok, thanks.

	Jakub



More information about the Gcc-patches mailing list