+2020-03-16 Tobias Burnus <tobias@codesourcery.com>
+
+ * omp-oacc-kernels-decompose.cc (maybe_build_inner_data_region):
+ is_gimple_reg vars are not yet mapped, fall through to map is as
+ before the transformation.
+ (omp_oacc_kernels_decompose_1): Don't map is_gimple_reg vars.
+ (decompose_kernels_region_body): Use tofrom for is_gimple_reg vars.
+ (omp_oacc_kernels_decompose_1): Handle is_gimple_reg vars as without
+ data kernels.
+
2020-03-12 Kwok Cheung Yeung <kcy@codesourcery.com>
* omp-sese.c (install_var_field): Generate a field name for a VAR_DECL
else
inner_bind_vars = next;
}
- else if (!idx_vars->contains (v))
+ else if (!idx_vars->contains (v) && !is_gimple_reg (v))
{
/* Otherwise, build the map clause. */
tree new_clause = build_omp_clause (loc, OMP_CLAUSE_MAP);
&& !idx_vars.contains (var))
{
tree present_clause = build_omp_clause (loc, OMP_CLAUSE_MAP);
- OMP_CLAUSE_SET_MAP_KIND (present_clause, GOMP_MAP_FORCE_PRESENT);
+ OMP_CLAUSE_SET_MAP_KIND (present_clause,
+ is_gimple_reg (var)
+ ? GOMP_MAP_TOFROM : GOMP_MAP_FORCE_PRESENT);
OMP_CLAUSE_DECL (present_clause) = var;
OMP_CLAUSE_SIZE (present_clause) = DECL_SIZE_UNIT (var);
OMP_CLAUSE_CHAIN (present_clause) = present_clauses;
region causes runtime errors. */
break;
+ if (is_gimple_reg (decl))
+ break;
+
/* For non-artificial variables, and for non-declaration
expressions like A[0:n], copy the clause to the data
region. */
+2020-03-17 Tobias Burnus <tobias@codesourcery.com>
+
+ * gfortran.dg/goacc/common-block-3.f90: Update scan-tree-dump-times.
+ * gfortran.dg/goacc/declare-3.f95: Update scan-tree-dump-times.
+
2018-10-04 Cesar Philippidis <cesar@codesourcery.com>
- Julian Brown <julian@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
* gfortran.dg/goacc/declare-allocatable-1.f90: New test.
! { dg-final { scan-tree-dump-times "omp target oacc_parallel .*map\\(tofrom:b \\\[len: 400\\\]\\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "omp target oacc_parallel .*map\\(tofrom:c \\\[len: 4\\\]\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_data_kernels .*map\\(tofrom:x \\\[len: 400\\\]\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_data_kernels .*map\\(tofrom:y \\\[len: 400\\\]\\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(force_present:x \\\[len: 400\\\]\\)" 1 "omplower" } }
+! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(force_present:y \\\[len: 400\\\]\\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(force_tofrom:i \\\[len: 4\\\]\\)" 1 "omplower" } }
-! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(tofrom:x \\\[len: 400\\\]\\)" 1 "omplower" } }
-! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(tofrom:y \\\[len: 400\\\]\\\)" 1 "omplower" } }
! { dg-final { scan-tree-dump-times "omp target oacc_kernels .*map\\(force_tofrom:c \\\[len: 4\\\]\\)" 1 "omplower" } }
! Expecting no mapping of un-referenced common-blocks variables
use mod_d
use mod_e
- ! { dg-final { scan-tree-dump {(?n)#pragma acc data map\(force_alloc:d\) map\(force_to:b\) map\(force_alloc:a\)$} original } }
+ ! { dg-final { scan-tree-dump {(?n)#pragma acc data map\(force_alloc:d\) map\(to:b\) map\(alloc:a\)$} original } }
end program test
! { dg-final { scan-tree-dump-times {#pragma acc data} 1 original } }