[Mlir-commits] [mlir] [mlir][OpenMP] Convert omp.cancel parallel to LLVMIR (PR #137192)
Tom Eccles
llvmlistbot at llvm.org
Wed Apr 30 06:56:27 PDT 2025
================
@@ -1580,6 +1587,21 @@ cleanupPrivateVars(llvm::IRBuilderBase &builder,
return success();
}
+/// Returns true if the construct contains omp.cancel or omp.cancellation_point
+static bool constructIsCancellable(Operation *op) {
+ // omp.cancel must be "closely nested" so it will be visible and not inside of
+ // funcion calls. This is enforced by the verifier.
+ bool containsCancel = false;
+ op->walk([&containsCancel](Operation *child) {
+ if (mlir::isa<omp::CancelOp>(child)) {
----------------
tblah wrote:
As I understand it, I do not think this is legal. There was some discussion of how to interpret the standard in my PR correcting the verifiers: https://github.com/llvm/llvm-project/pull/134084
https://github.com/llvm/llvm-project/pull/137192
More information about the Mlir-commits
mailing list