Some OpenACC host_data cleanup
gcc/c/ * c-parser.c (c_parser_omp_clause_name) (c_parser_oacc_all_clauses): Alphabetical sorting. gcc/cp/ * parser.c (cp_parser_omp_clause_name) (cp_parser_oacc_all_clauses): Alphabetical sorting. * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_USE_DEVICE. gcc/testsuite/ * c-c++-common/goacc/host_data-5.c: New file. * c-c++-common/goacc/host_data-6.c: Likewise. * gfortran.dg/goacc/coarray.f95: XFAIL. * gfortran.dg/goacc/coarray_2.f90: Adjust dg-excess-errors directive. * gfortran.dg/goacc/host_data-tree.f95: Remove dg-prune-output directive. libgomp/ * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: Restrict to target openacc_nvidia_accel_selected. * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: Remove file. * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: Remove file. Co-Authored-By: James Norris <James_Norris@mentor.com> Co-Authored-By: Julian Brown <julian@codesourcery.com> From-SVN: r231184
This commit is contained in:
parent
db0f1c7a90
commit
ff7a55bf56
|
@ -1,3 +1,8 @@
|
||||||
|
2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* c-parser.c (c_parser_omp_clause_name)
|
||||||
|
(c_parser_oacc_all_clauses): Alphabetical sorting.
|
||||||
|
|
||||||
2015-12-02 Jakub Jelinek <jakub@redhat.com>
|
2015-12-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR c/68533
|
PR c/68533
|
||||||
|
|
|
@ -10277,10 +10277,10 @@ c_parser_omp_clause_name (c_parser *parser)
|
||||||
result = PRAGMA_OMP_CLAUSE_UNIFORM;
|
result = PRAGMA_OMP_CLAUSE_UNIFORM;
|
||||||
else if (!strcmp ("untied", p))
|
else if (!strcmp ("untied", p))
|
||||||
result = PRAGMA_OMP_CLAUSE_UNTIED;
|
result = PRAGMA_OMP_CLAUSE_UNTIED;
|
||||||
else if (!strcmp ("use_device_ptr", p))
|
|
||||||
result = PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR;
|
|
||||||
else if (!strcmp ("use_device", p))
|
else if (!strcmp ("use_device", p))
|
||||||
result = PRAGMA_OACC_CLAUSE_USE_DEVICE;
|
result = PRAGMA_OACC_CLAUSE_USE_DEVICE;
|
||||||
|
else if (!strcmp ("use_device_ptr", p))
|
||||||
|
result = PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
if (!strcmp ("vector", p))
|
if (!strcmp ("vector", p))
|
||||||
|
@ -12951,10 +12951,6 @@ c_parser_oacc_all_clauses (c_parser *parser, omp_clause_mask mask,
|
||||||
clauses = c_parser_oacc_data_clause (parser, c_kind, clauses);
|
clauses = c_parser_oacc_data_clause (parser, c_kind, clauses);
|
||||||
c_name = "self";
|
c_name = "self";
|
||||||
break;
|
break;
|
||||||
case PRAGMA_OACC_CLAUSE_USE_DEVICE:
|
|
||||||
clauses = c_parser_oacc_clause_use_device (parser, clauses);
|
|
||||||
c_name = "use_device";
|
|
||||||
break;
|
|
||||||
case PRAGMA_OACC_CLAUSE_SEQ:
|
case PRAGMA_OACC_CLAUSE_SEQ:
|
||||||
clauses = c_parser_oacc_simple_clause (parser, OMP_CLAUSE_SEQ,
|
clauses = c_parser_oacc_simple_clause (parser, OMP_CLAUSE_SEQ,
|
||||||
clauses);
|
clauses);
|
||||||
|
@ -12964,6 +12960,10 @@ c_parser_oacc_all_clauses (c_parser *parser, omp_clause_mask mask,
|
||||||
clauses = c_parser_oacc_clause_tile (parser, clauses);
|
clauses = c_parser_oacc_clause_tile (parser, clauses);
|
||||||
c_name = "tile";
|
c_name = "tile";
|
||||||
break;
|
break;
|
||||||
|
case PRAGMA_OACC_CLAUSE_USE_DEVICE:
|
||||||
|
clauses = c_parser_oacc_clause_use_device (parser, clauses);
|
||||||
|
c_name = "use_device";
|
||||||
|
break;
|
||||||
case PRAGMA_OACC_CLAUSE_VECTOR:
|
case PRAGMA_OACC_CLAUSE_VECTOR:
|
||||||
c_name = "vector";
|
c_name = "vector";
|
||||||
clauses = c_parser_oacc_shape_clause (parser, OMP_CLAUSE_VECTOR,
|
clauses = c_parser_oacc_shape_clause (parser, OMP_CLAUSE_VECTOR,
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* parser.c (cp_parser_omp_clause_name)
|
||||||
|
(cp_parser_oacc_all_clauses): Alphabetical sorting.
|
||||||
|
* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_USE_DEVICE.
|
||||||
|
|
||||||
2015-12-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
2015-12-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
||||||
|
|
||||||
PR gcov-profile/68603
|
PR gcov-profile/68603
|
||||||
|
|
|
@ -29230,10 +29230,10 @@ cp_parser_omp_clause_name (cp_parser *parser)
|
||||||
result = PRAGMA_OMP_CLAUSE_UNIFORM;
|
result = PRAGMA_OMP_CLAUSE_UNIFORM;
|
||||||
else if (!strcmp ("untied", p))
|
else if (!strcmp ("untied", p))
|
||||||
result = PRAGMA_OMP_CLAUSE_UNTIED;
|
result = PRAGMA_OMP_CLAUSE_UNTIED;
|
||||||
else if (!strcmp ("use_device_ptr", p))
|
|
||||||
result = PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR;
|
|
||||||
else if (!strcmp ("use_device", p))
|
else if (!strcmp ("use_device", p))
|
||||||
result = PRAGMA_OACC_CLAUSE_USE_DEVICE;
|
result = PRAGMA_OACC_CLAUSE_USE_DEVICE;
|
||||||
|
else if (!strcmp ("use_device_ptr", p))
|
||||||
|
result = PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
if (!strcmp ("vector", p))
|
if (!strcmp ("vector", p))
|
||||||
|
@ -31600,11 +31600,6 @@ cp_parser_oacc_all_clauses (cp_parser *parser, omp_clause_mask mask,
|
||||||
clauses = cp_parser_oacc_data_clause (parser, c_kind, clauses);
|
clauses = cp_parser_oacc_data_clause (parser, c_kind, clauses);
|
||||||
c_name = "self";
|
c_name = "self";
|
||||||
break;
|
break;
|
||||||
case PRAGMA_OACC_CLAUSE_USE_DEVICE:
|
|
||||||
clauses = cp_parser_omp_var_list (parser, OMP_CLAUSE_USE_DEVICE,
|
|
||||||
clauses);
|
|
||||||
c_name = "use_device";
|
|
||||||
break;
|
|
||||||
case PRAGMA_OACC_CLAUSE_SEQ:
|
case PRAGMA_OACC_CLAUSE_SEQ:
|
||||||
clauses = cp_parser_oacc_simple_clause (parser, OMP_CLAUSE_SEQ,
|
clauses = cp_parser_oacc_simple_clause (parser, OMP_CLAUSE_SEQ,
|
||||||
clauses, here);
|
clauses, here);
|
||||||
|
@ -31614,6 +31609,11 @@ cp_parser_oacc_all_clauses (cp_parser *parser, omp_clause_mask mask,
|
||||||
clauses = cp_parser_oacc_clause_tile (parser, here, clauses);
|
clauses = cp_parser_oacc_clause_tile (parser, here, clauses);
|
||||||
c_name = "tile";
|
c_name = "tile";
|
||||||
break;
|
break;
|
||||||
|
case PRAGMA_OACC_CLAUSE_USE_DEVICE:
|
||||||
|
clauses = cp_parser_omp_var_list (parser, OMP_CLAUSE_USE_DEVICE,
|
||||||
|
clauses);
|
||||||
|
c_name = "use_device";
|
||||||
|
break;
|
||||||
case PRAGMA_OACC_CLAUSE_VECTOR:
|
case PRAGMA_OACC_CLAUSE_VECTOR:
|
||||||
c_name = "vector";
|
c_name = "vector";
|
||||||
clauses = cp_parser_oacc_shape_clause (parser, OMP_CLAUSE_VECTOR,
|
clauses = cp_parser_oacc_shape_clause (parser, OMP_CLAUSE_VECTOR,
|
||||||
|
@ -34516,13 +34516,13 @@ cp_parser_oacc_data (cp_parser *parser, cp_token *pragma_tok)
|
||||||
return stmt;
|
return stmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define OACC_HOST_DATA_CLAUSE_MASK \
|
|
||||||
( (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_USE_DEVICE) )
|
|
||||||
|
|
||||||
/* OpenACC 2.0:
|
/* OpenACC 2.0:
|
||||||
# pragma acc host_data <clauses> new-line
|
# pragma acc host_data <clauses> new-line
|
||||||
structured-block */
|
structured-block */
|
||||||
|
|
||||||
|
#define OACC_HOST_DATA_CLAUSE_MASK \
|
||||||
|
( (OMP_CLAUSE_MASK_1 << PRAGMA_OACC_CLAUSE_USE_DEVICE) )
|
||||||
|
|
||||||
static tree
|
static tree
|
||||||
cp_parser_oacc_host_data (cp_parser *parser, cp_token *pragma_tok)
|
cp_parser_oacc_host_data (cp_parser *parser, cp_token *pragma_tok)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14387,6 +14387,7 @@ tsubst_omp_clauses (tree clauses, bool declare_simd, bool allow_fields,
|
||||||
case OMP_CLAUSE_FROM:
|
case OMP_CLAUSE_FROM:
|
||||||
case OMP_CLAUSE_TO:
|
case OMP_CLAUSE_TO:
|
||||||
case OMP_CLAUSE_MAP:
|
case OMP_CLAUSE_MAP:
|
||||||
|
case OMP_CLAUSE_USE_DEVICE:
|
||||||
case OMP_CLAUSE_USE_DEVICE_PTR:
|
case OMP_CLAUSE_USE_DEVICE_PTR:
|
||||||
case OMP_CLAUSE_IS_DEVICE_PTR:
|
case OMP_CLAUSE_IS_DEVICE_PTR:
|
||||||
OMP_CLAUSE_DECL (nc)
|
OMP_CLAUSE_DECL (nc)
|
||||||
|
@ -14513,6 +14514,7 @@ tsubst_omp_clauses (tree clauses, bool declare_simd, bool allow_fields,
|
||||||
case OMP_CLAUSE_COPYPRIVATE:
|
case OMP_CLAUSE_COPYPRIVATE:
|
||||||
case OMP_CLAUSE_LINEAR:
|
case OMP_CLAUSE_LINEAR:
|
||||||
case OMP_CLAUSE_REDUCTION:
|
case OMP_CLAUSE_REDUCTION:
|
||||||
|
case OMP_CLAUSE_USE_DEVICE:
|
||||||
case OMP_CLAUSE_USE_DEVICE_PTR:
|
case OMP_CLAUSE_USE_DEVICE_PTR:
|
||||||
case OMP_CLAUSE_IS_DEVICE_PTR:
|
case OMP_CLAUSE_IS_DEVICE_PTR:
|
||||||
/* tsubst_expr on SCOPE_REF results in returning
|
/* tsubst_expr on SCOPE_REF results in returning
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* gfortran.dg/goacc/coarray.f95: XFAIL.
|
||||||
|
* gfortran.dg/goacc/coarray_2.f90: Adjust dg-excess-errors
|
||||||
|
directive.
|
||||||
|
* gfortran.dg/goacc/host_data-tree.f95: Remove dg-prune-output
|
||||||
|
directive.
|
||||||
|
|
||||||
|
2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
Julian Brown <julian@codesourcery.com>
|
||||||
|
James Norris <James_Norris@mentor.com>
|
||||||
|
|
||||||
|
* c-c++-common/goacc/host_data-5.c: New file.
|
||||||
|
* c-c++-common/goacc/host_data-6.c: Likewise.
|
||||||
|
|
||||||
2015-12-02 Tom de Vries <tom@codesourcery.com>
|
2015-12-02 Tom de Vries <tom@codesourcery.com>
|
||||||
|
|
||||||
* c-c++-common/goacc/kernels-default-2.c: New test.
|
* c-c++-common/goacc/kernels-default-2.c: New test.
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
/* { dg-do compile } */
|
/* { dg-do compile } */
|
||||||
|
|
||||||
#include <openacc.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define N 1024
|
#define N 1024
|
||||||
|
|
||||||
int main (int argc, char* argv[])
|
int main (int argc, char* argv[])
|
||||||
|
@ -20,9 +17,6 @@ int main (int argc, char* argv[])
|
||||||
xp = x;
|
xp = x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xp != acc_deviceptr (x))
|
|
||||||
abort ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
|
@ -1,8 +1,5 @@
|
||||||
/* { dg-do compile } */
|
/* { dg-do compile } */
|
||||||
|
|
||||||
#include <openacc.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define N 1024
|
#define N 1024
|
||||||
|
|
||||||
int main (int argc, char* argv[])
|
int main (int argc, char* argv[])
|
||||||
|
@ -22,9 +19,6 @@ int main (int argc, char* argv[])
|
||||||
xp = x; /* { dg-error "variable 'x' declared in enclosing 'host_data' region" } */
|
xp = x; /* { dg-error "variable 'x' declared in enclosing 'host_data' region" } */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xp != acc_deviceptr (x))
|
|
||||||
abort ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
|
@ -1,7 +1,9 @@
|
||||||
! { dg-do compile }
|
! { dg-do compile }
|
||||||
! { dg-additional-options "-fcoarray=single" }
|
! { dg-additional-options "-fcoarray=single" }
|
||||||
|
!
|
||||||
! TODO: These cases must fail
|
! PR fortran/63861
|
||||||
|
! { dg-xfail-if "<http://gcc.gnu.org/PR63861>" { *-*-* } }
|
||||||
|
! { dg-excess-errors "TODO" }
|
||||||
|
|
||||||
module test
|
module test
|
||||||
contains
|
contains
|
||||||
|
@ -9,7 +11,6 @@ contains
|
||||||
implicit none
|
implicit none
|
||||||
integer :: i
|
integer :: i
|
||||||
integer, codimension[*] :: a
|
integer, codimension[*] :: a
|
||||||
! { dg-excess-errors "sorry, unimplemented: directive not yet implemented" }
|
|
||||||
!$acc declare device_resident (a)
|
!$acc declare device_resident (a)
|
||||||
!$acc data copy (a)
|
!$acc data copy (a)
|
||||||
!$acc end data
|
!$acc end data
|
||||||
|
@ -17,7 +18,6 @@ contains
|
||||||
!$acc end data
|
!$acc end data
|
||||||
!$acc parallel private (a)
|
!$acc parallel private (a)
|
||||||
!$acc end parallel
|
!$acc end parallel
|
||||||
! { dg-excess-errors "sorry, unimplemented: directive not yet implemented" }
|
|
||||||
!$acc host_data use_device (a)
|
!$acc host_data use_device (a)
|
||||||
!$acc end host_data
|
!$acc end host_data
|
||||||
!$acc parallel loop reduction(+:a)
|
!$acc parallel loop reduction(+:a)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
!
|
!
|
||||||
! PR fortran/63861
|
! PR fortran/63861
|
||||||
! { dg-xfail-if "<http://gcc.gnu.org/PR63861>" { *-*-* } }
|
! { dg-xfail-if "<http://gcc.gnu.org/PR63861>" { *-*-* } }
|
||||||
|
! { dg-excess-errors "TODO" }
|
||||||
|
|
||||||
module test
|
module test
|
||||||
contains
|
contains
|
||||||
|
@ -106,4 +107,3 @@ contains
|
||||||
!$acc update self (a)
|
!$acc update self (a)
|
||||||
end subroutine oacc4
|
end subroutine oacc4
|
||||||
end module test
|
end module test
|
||||||
! { dg-excess-errors "sorry, unimplemented: directive not yet implemented" }
|
|
||||||
|
|
|
@ -8,5 +8,4 @@ program test
|
||||||
!$acc host_data use_device(i)
|
!$acc host_data use_device(i)
|
||||||
!$acc end host_data
|
!$acc end host_data
|
||||||
end program test
|
end program test
|
||||||
! { dg-prune-output "unimplemented" }
|
|
||||||
! { dg-final { scan-tree-dump-times "pragma acc host_data use_device\\(i\\)" 1 "original" } }
|
! { dg-final { scan-tree-dump-times "pragma acc host_data use_device\\(i\\)" 1 "original" } }
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
|
* testsuite/libgomp.oacc-c-c++-common/host_data-2.c: Restrict to
|
||||||
|
target openacc_nvidia_accel_selected.
|
||||||
|
* testsuite/libgomp.oacc-c-c++-common/host_data-4.c: Likewise.
|
||||||
|
* testsuite/libgomp.oacc-c-c++-common/host_data-5.c: Likewise.
|
||||||
|
* testsuite/libgomp.oacc-c-c++-common/host_data-3.c: Remove file.
|
||||||
|
* testsuite/libgomp.oacc-c-c++-common/host_data-6.c: Remove file.
|
||||||
|
|
||||||
2015-12-01 Julian Brown <julian@codesourcery.com>
|
2015-12-01 Julian Brown <julian@codesourcery.com>
|
||||||
James Norris <James_Norris@mentor.com>
|
James Norris <James_Norris@mentor.com>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* { dg-do run } */
|
/* { dg-do run { target openacc_nvidia_accel_selected } } */
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <openacc.h>
|
#include <openacc.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* { dg-do run } */
|
/* { dg-do run { target openacc_nvidia_accel_selected } } */
|
||||||
|
|
||||||
#include <openacc.h>
|
#include <openacc.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* { dg-do run } */
|
/* { dg-do run { target openacc_nvidia_accel_selected } } */
|
||||||
|
|
||||||
#include <openacc.h>
|
#include <openacc.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
Loading…
Reference in New Issue