[PATCH] D123828: [mlir][OpenMP] Add omp.cancel and omp.cancellationpoint.
Raghu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 14:22:04 PDT 2022
raghavendhra planned changes to this revision.
raghavendhra added a comment.
In D123828#3458727 <https://reviews.llvm.org/D123828#3458727>, @kiranchandramohan wrote:
> @raghavendhra Apologies for not being clear. The change request was to add a verifier to the operation to issue errors where the closely nested construct restrictions do not hold.
>
> As per the standard, for example, the following usages are not allowed.
>
> !$omp master
> !$omp cancel parallel
> !$omp end master
>
> !$omp cancel parallel
>
> Could you go through the restrictions of cancel and cancellation point (the restriction on nesting of constructs) and implement these in the verifier? You could use the Reduction Op's verifier for reference. We probably have to check the parent Op and ensure it meets the restrictions specified in the standard.
> https://github.com/llvm/llvm-project/blob/76410040b9f391185c7df48c14519860e1cf75e5/mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td#L1074
> https://github.com/llvm/llvm-project/blob/76410040b9f391185c7df48c14519860e1cf75e5/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp#L713
Thank you so much for more insight. I added verifier and tests to invalid.mlir. Please review my latest changes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123828/new/
https://reviews.llvm.org/D123828
More information about the llvm-commits
mailing list