On Tue, Mar 31, 2020 at 07:41:40PM +0200, Tobias Burnus wrote:
> On 3/31/20 5:35 PM, Jakub Jelinek via Gcc-patches wrote:
> 
> > Doing the mappings separately is intentional, while for target data or
> > target region mappings it is very likely they will be all released together
> > as well, so it doesn't matter if they all go from the single same mapping,
> > for target enter data it is often not the case.
> > If everything is mapped together, then it can't be really freed until all
> > the mappings get refcount of 0.
> > So, instead of the change you've posted, there should be in
> > GOMP_target_enter_exit_data code to also handle GOMP_MAP_TO_PSET and put the
> > right number of mappings after it in one block and leave the rest separate.
> 
> Done in that way – including adding a rational comment :-)
> 
> OK for mainline?

LGTM, thanks.

> libgomp – fix handling of 'target enter data'
> 
>       * target.c (GOMP_target_enter_exit_data): Handle PSET/MAP_POINTER.
>       * testsuite/libgomp.fortran/target-enter-data-1.f90: New.

        Jakub

Reply via email to