@@ -3447,7 +3447,7 @@ WRAPPER_CLASS(OmpObjectList, std::list<OmpObject>);
3447
3447
// MUTEXINOUTSET | DEPOBJ | // since 5.0
3448
3448
// INOUTSET // since 5.2
3449
3449
struct OmpTaskDependenceType {
3450
- ENUM_CLASS (Type, In, Out, Inout, Source, Sink)
3450
+ ENUM_CLASS (Type, In, Out, Inout, Source, Sink, Depobj )
3451
3451
WRAPPER_CLASS_BOILERPLATE (OmpTaskDependenceType, Type);
3452
3452
};
3453
3453
@@ -3527,19 +3527,6 @@ struct OmpDefaultmapClause {
3527
3527
std::tuple<ImplicitBehavior, std::optional<VariableCategory>> t;
3528
3528
};
3529
3529
3530
- // device([ device-modifier :] scalar-integer-expression)
3531
- struct OmpDeviceClause {
3532
- TUPLE_CLASS_BOILERPLATE (OmpDeviceClause);
3533
- ENUM_CLASS (DeviceModifier, Ancestor, Device_Num)
3534
- std::tuple<std::optional<DeviceModifier>, ScalarIntExpr> t;
3535
- };
3536
-
3537
- // device_type(any | host | nohost)
3538
- struct OmpDeviceTypeClause {
3539
- ENUM_CLASS (Type, Any, Host, Nohost)
3540
- WRAPPER_CLASS_BOILERPLATE (OmpDeviceTypeClause, Type);
3541
- };
3542
-
3543
3530
// 2.13.9 depend-vec-length -> +/- non-negative-constant
3544
3531
struct OmpDependSinkVecLength {
3545
3532
TUPLE_CLASS_BOILERPLATE (OmpDependSinkVecLength);
@@ -3561,6 +3548,8 @@ struct OmpDependSinkVec {
3561
3548
//
3562
3549
// depend-modifier -> iterator-modifier // since 5.0
3563
3550
struct OmpDependClause {
3551
+ OmpTaskDependenceType::Type GetDepType () const ;
3552
+
3564
3553
UNION_CLASS_BOILERPLATE (OmpDependClause);
3565
3554
EMPTY_CLASS (Source);
3566
3555
WRAPPER_CLASS (Sink, std::list<OmpDependSinkVec>);
@@ -3573,6 +3562,26 @@ struct OmpDependClause {
3573
3562
std::variant<Source, Sink, InOut> u;
3574
3563
};
3575
3564
3565
+ // Ref: [5.0:254-255], [5.1:287-288], [5.2:73]
3566
+ //
3567
+ // destroy-clause ->
3568
+ // DESTROY | // since 5.0, until 5.2
3569
+ // DESTROY(variable) // since 5.2
3570
+ WRAPPER_CLASS (OmpDestroyClause, OmpObject);
3571
+
3572
+ // device([ device-modifier :] scalar-integer-expression)
3573
+ struct OmpDeviceClause {
3574
+ TUPLE_CLASS_BOILERPLATE (OmpDeviceClause);
3575
+ ENUM_CLASS (DeviceModifier, Ancestor, Device_Num)
3576
+ std::tuple<std::optional<DeviceModifier>, ScalarIntExpr> t;
3577
+ };
3578
+
3579
+ // device_type(any | host | nohost)
3580
+ struct OmpDeviceTypeClause {
3581
+ ENUM_CLASS (Type, Any, Host, Nohost)
3582
+ WRAPPER_CLASS_BOILERPLATE (OmpDeviceTypeClause, Type);
3583
+ };
3584
+
3576
3585
// OMP 5.2 12.6.1 grainsize-clause -> grainsize ([prescriptiveness :] value)
3577
3586
struct OmpGrainsizeClause {
3578
3587
TUPLE_CLASS_BOILERPLATE (OmpGrainsizeClause);
@@ -3716,6 +3725,11 @@ struct OmpNumTasksClause {
3716
3725
std::tuple<std::optional<Prescriptiveness>, ScalarIntExpr> t;
3717
3726
};
3718
3727
3728
+ // Ref: [5.0:254-255], [5.1:287-288], [5.2:321-322]
3729
+ //
3730
+ // update-clause -> UPDATE(task-dependence-type) // since 5.0
3731
+ WRAPPER_CLASS (OmpUpdateClause, OmpTaskDependenceType);
3732
+
3719
3733
// OpenMP Clauses
3720
3734
struct OmpClause {
3721
3735
UNION_CLASS_BOILERPLATE (OmpClause);
@@ -4023,6 +4037,18 @@ struct OpenMPCancelConstruct {
4023
4037
std::tuple<Verbatim, OmpCancelType, std::optional<If>> t;
4024
4038
};
4025
4039
4040
+ // Ref: [5.0:254-255], [5.1:287-288], [5.2:322-323]
4041
+ //
4042
+ // depobj-construct -> DEPOBJ(depend-object) depobj-clause // since 5.0
4043
+ // depobj-clause -> depend-clause | // until 5.2
4044
+ // destroy-clause |
4045
+ // update-clause
4046
+ struct OpenMPDepobjConstruct {
4047
+ TUPLE_CLASS_BOILERPLATE (OpenMPDepobjConstruct);
4048
+ CharBlock source;
4049
+ std::tuple<Verbatim, OmpObject, OmpClause> t;
4050
+ };
4051
+
4026
4052
// 2.17.8 flush -> FLUSH [memory-order-clause] [(variable-name-list)]
4027
4053
struct OpenMPFlushConstruct {
4028
4054
TUPLE_CLASS_BOILERPLATE (OpenMPFlushConstruct);
@@ -4047,7 +4073,8 @@ struct OpenMPStandaloneConstruct {
4047
4073
UNION_CLASS_BOILERPLATE (OpenMPStandaloneConstruct);
4048
4074
CharBlock source;
4049
4075
std::variant<OpenMPSimpleStandaloneConstruct, OpenMPFlushConstruct,
4050
- OpenMPCancelConstruct, OpenMPCancellationPointConstruct>
4076
+ OpenMPCancelConstruct, OpenMPCancellationPointConstruct,
4077
+ OpenMPDepobjConstruct>
4051
4078
u;
4052
4079
};
4053
4080
0 commit comments