diff options
author | Raghu Maddhipatla <raghu.maddhipatla@amd.com> | 2022-05-02 12:23:11 -0500 |
---|---|---|
committer | Raghu Maddhipatla <raghu.maddhipatla@amd.com> | 2022-05-02 12:23:38 -0500 |
commit | c685f8212689665968de47f8bd4b1146296e8cc2 (patch) | |
tree | 8df7cfd3769ae329b8ec2879e8a948a1ec6ece89 /llvm | |
parent | 38d0df557706940af5d7110bdf662590449f8a60 (diff) | |
download | llvm-c685f8212689665968de47f8bd4b1146296e8cc2.zip llvm-c685f8212689665968de47f8bd4b1146296e8cc2.tar.gz llvm-c685f8212689665968de47f8bd4b1146296e8cc2.tar.bz2 |
[mlir][OpenMP] Add omp.cancel and omp.cancellationpoint.
Reviewed By: kiranchandramohan, peixin, shraiysh
Differential Revision: https://reviews.llvm.org/D123828
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/Frontend/OpenMP/OMP.td | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td index e5a1dd3..9575f6d 100644 --- a/llvm/include/llvm/Frontend/OpenMP/OMP.td +++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td @@ -163,6 +163,25 @@ def OMPC_MemoryOrder : Clause<"memory_order"> { ]; } +def OMP_CANCELLATION_CONSTRUCT_Parallel : ClauseVal<"parallel", 1, 1> {} +def OMP_CANCELLATION_CONSTRUCT_Loop : ClauseVal<"loop", 2, 1> {} +def OMP_CANCELLATION_CONSTRUCT_Sections : ClauseVal<"sections", 3, 1> {} +def OMP_CANCELLATION_CONSTRUCT_Taskgroup : ClauseVal<"taskgroup", 4, 1> {} +def OMP_CANCELLATION_CONSTRUCT_None : ClauseVal<"none", 5, 0> { + let isDefault = 1; +} + +def OMPC_CancellationConstructType : Clause<"cancellation_construct_type"> { + let enumClauseValue = "CancellationConstructType"; + let allowedClauseValues = [ + OMP_CANCELLATION_CONSTRUCT_Parallel, + OMP_CANCELLATION_CONSTRUCT_Loop, + OMP_CANCELLATION_CONSTRUCT_Sections, + OMP_CANCELLATION_CONSTRUCT_Taskgroup, + OMP_CANCELLATION_CONSTRUCT_None + ]; +} + def OMPC_Ordered : Clause<"ordered"> { let clangClass = "OMPOrderedClause"; let flangClass = "ScalarIntConstantExpr"; |