[flang][openacc] Allow multiple wait clauses
kernels loop and enter data had a too restrictive constraint for the wait clause. The wait clause is allowed multiple times and not only once. This patch fix this problem. Reviewed By: SouraVX Differential Revision: https://reviews.llvm.org/D95469
This commit is contained in:
parent
90407b16b1
commit
f30c523660
|
@ -63,6 +63,8 @@ program openacc_data_validity
|
|||
|
||||
!$acc enter data create(aa) wait(wait1, wait2)
|
||||
|
||||
!$acc enter data create(aa) wait(wait1) wait(wait2)
|
||||
|
||||
!$acc enter data attach(bb)
|
||||
|
||||
!ERROR: At least one of COPYOUT, DELETE, DETACH clause must appear on the EXIT DATA directive
|
||||
|
|
|
@ -122,6 +122,11 @@ program openacc_kernels_loop_validity
|
|||
a(i) = 3.14
|
||||
end do
|
||||
|
||||
!$acc kernels loop wait(wait1) wait(wait2)
|
||||
do i = 1, N
|
||||
a(i) = 3.14
|
||||
end do
|
||||
|
||||
!$acc kernels loop wait(1, 2) async(3)
|
||||
do i = 1, N
|
||||
a(i) = 3.14
|
||||
|
|
|
@ -477,10 +477,12 @@ def ACC_Wait : Directive<"wait"> {
|
|||
|
||||
// 2.14.6
|
||||
def ACC_EnterData : Directive<"enter data"> {
|
||||
let allowedClauses = [
|
||||
VersionedClause<ACCC_Wait>
|
||||
];
|
||||
let allowedOnceClauses = [
|
||||
VersionedClause<ACCC_Async>,
|
||||
VersionedClause<ACCC_If>,
|
||||
VersionedClause<ACCC_Wait>
|
||||
VersionedClause<ACCC_If>
|
||||
];
|
||||
let requiredClauses = [
|
||||
VersionedClause<ACCC_Attach>,
|
||||
|
@ -529,7 +531,8 @@ def ACC_KernelsLoop : Directive<"kernels loop"> {
|
|||
VersionedClause<ACCC_Present>,
|
||||
VersionedClause<ACCC_Private>,
|
||||
VersionedClause<ACCC_DevicePtr>,
|
||||
VersionedClause<ACCC_Attach>
|
||||
VersionedClause<ACCC_Attach>,
|
||||
VersionedClause<ACCC_Wait>
|
||||
];
|
||||
let allowedOnceClauses = [
|
||||
VersionedClause<ACCC_Async>,
|
||||
|
@ -544,7 +547,6 @@ def ACC_KernelsLoop : Directive<"kernels loop"> {
|
|||
VersionedClause<ACCC_Tile>,
|
||||
VersionedClause<ACCC_Vector>,
|
||||
VersionedClause<ACCC_VectorLength>,
|
||||
VersionedClause<ACCC_Wait>,
|
||||
VersionedClause<ACCC_Worker>
|
||||
];
|
||||
let allowedExclusiveClauses = [
|
||||
|
|
Loading…
Reference in a new issue