@@ -123,6 +123,7 @@ static int get_omp_combined_mode(BIGINT64 type);
123123static void mp_handle_map_clause (SST * , int , char * , int , int , bool );
124124static void mp_check_maptype (const char * maptype );
125125static LOGICAL is_in_omptarget (int d );
126+ static LOGICAL is_in_omptarget_data (int d );
126127#endif
127128#ifdef OMP_OFFLOAD_LLVM
128129static void gen_reduction_ompaccel (REDUC * reducp , REDUC_SYM * reduc_symp ,
@@ -4822,7 +4823,7 @@ semsmp(int rednum, SST *top)
48224823 */
48234824 case ACCEL_DATA1 :
48244825#if defined(OMP_OFFLOAD_LLVM ) || defined(OMP_OFFLOAD_PGI )
4825- if (is_in_omptarget (sem .doif_depth )) {
4826+ if (is_in_omptarget (sem .doif_depth ) || is_in_omptarget_data ( sem . doif_depth ) ) {
48264827 //todo support array section in the map clause for openmp
48274828 if (SST_IDG (RHS (1 )) == S_IDENT || SST_IDG (RHS (1 )) == S_DERIVED ) {
48284829 sptr = SST_SYMG (RHS (1 ));
@@ -10292,13 +10293,22 @@ check_map_data_sharing(int sptr)
1029210293 return TRUE;
1029310294}
1029410295
10296+ static LOGICAL is_in_omptarget_data (int d )
10297+ {
10298+ if (flg .omptarget && (DI_IN_NEST (d , DI_TARGETENTERDATA ) ||
10299+ DI_IN_NEST (d , DI_TARGETEXITDATA ) ||
10300+ DI_IN_NEST (d , DI_TARGETDATA )))
10301+ return TRUE;
10302+ return FALSE;
10303+ }
1029510304static LOGICAL is_in_omptarget (int d )
1029610305{
1029710306 if (flg .omptarget && (DI_IN_NEST (d , DI_TARGET ) ||
1029810307 DI_IN_NEST (d , DI_TARGTEAMSDISTPARDO ) ||
1029910308 DI_IN_NEST (d , DI_TARGPARDO ) ||
1030010309 DI_IN_NEST (d , DI_TARGETSIMD ) ||
10301- DI_IN_NEST (d , DI_TARGTEAMSDIST )))
10310+ DI_IN_NEST (d , DI_TARGTEAMSDIST ) ||
10311+ DI_IN_NEST (d , DI_TARGETENTERDATA )))
1030210312 return TRUE;
1030310313 return FALSE;
1030410314}
0 commit comments