@@ -3447,7 +3447,7 @@ WRAPPER_CLASS(OmpObjectList, std::list<OmpObject>);
34473447// MUTEXINOUTSET | DEPOBJ | // since 5.0
34483448// INOUTSET // since 5.2
34493449struct OmpTaskDependenceType {
3450- ENUM_CLASS (Type, In, Out, Inout, Source, Sink)
3450+ ENUM_CLASS (Type, In, Out, Inout, Source, Sink, Depobj )
34513451 WRAPPER_CLASS_BOILERPLATE (OmpTaskDependenceType, Type);
34523452};
34533453
@@ -3527,19 +3527,6 @@ struct OmpDefaultmapClause {
35273527 std::tuple<ImplicitBehavior, std::optional<VariableCategory>> t;
35283528};
35293529
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-
35433530// 2.13.9 depend-vec-length -> +/- non-negative-constant
35443531struct OmpDependSinkVecLength {
35453532 TUPLE_CLASS_BOILERPLATE (OmpDependSinkVecLength);
@@ -3561,6 +3548,8 @@ struct OmpDependSinkVec {
35613548//
35623549// depend-modifier -> iterator-modifier // since 5.0
35633550struct OmpDependClause {
3551+ OmpTaskDependenceType::Type GetDepType () const ;
3552+
35643553 UNION_CLASS_BOILERPLATE (OmpDependClause);
35653554 EMPTY_CLASS (Source);
35663555 WRAPPER_CLASS (Sink, std::list<OmpDependSinkVec>);
@@ -3573,6 +3562,26 @@ struct OmpDependClause {
35733562 std::variant<Source, Sink, InOut> u;
35743563};
35753564
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+
35763585// OMP 5.2 12.6.1 grainsize-clause -> grainsize ([prescriptiveness :] value)
35773586struct OmpGrainsizeClause {
35783587 TUPLE_CLASS_BOILERPLATE (OmpGrainsizeClause);
@@ -3716,6 +3725,11 @@ struct OmpNumTasksClause {
37163725 std::tuple<std::optional<Prescriptiveness>, ScalarIntExpr> t;
37173726};
37183727
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+
37193733// OpenMP Clauses
37203734struct OmpClause {
37213735 UNION_CLASS_BOILERPLATE (OmpClause);
@@ -4023,6 +4037,18 @@ struct OpenMPCancelConstruct {
40234037 std::tuple<Verbatim, OmpCancelType, std::optional<If>> t;
40244038};
40254039
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+
40264052// 2.17.8 flush -> FLUSH [memory-order-clause] [(variable-name-list)]
40274053struct OpenMPFlushConstruct {
40284054 TUPLE_CLASS_BOILERPLATE (OpenMPFlushConstruct);
@@ -4047,7 +4073,8 @@ struct OpenMPStandaloneConstruct {
40474073 UNION_CLASS_BOILERPLATE (OpenMPStandaloneConstruct);
40484074 CharBlock source;
40494075 std::variant<OpenMPSimpleStandaloneConstruct, OpenMPFlushConstruct,
4050- OpenMPCancelConstruct, OpenMPCancellationPointConstruct>
4076+ OpenMPCancelConstruct, OpenMPCancellationPointConstruct,
4077+ OpenMPDepobjConstruct>
40514078 u;
40524079};
40534080
0 commit comments