[Mlir-commits] [mlir] [MLIR][OpenMP] Lowering support for Order clause in SIMD directive (PR #96866)

Kiran Chandramohan llvmlistbot at llvm.org
Thu Jun 27 02:40:58 PDT 2024


================
@@ -1543,7 +1543,9 @@ convertOmpSimd(Operation &opInst, llvm::IRBuilderBase &builder,
       loopInfo, alignedVars,
       simdOp.getIfExpr() ? moduleTranslation.lookupValue(simdOp.getIfExpr())
                          : nullptr,
-      llvm::omp::OrderKind::OMP_ORDER_unknown, simdlen, safelen);
+      simdOp.getOrderVal() ? llvm::omp::OrderKind::OMP_ORDER_concurrent
+                           : llvm::omp::OrderKind::OMP_ORDER_unknown,
----------------
kiranchandramohan wrote:

I see that OrderVal is an enum (not a unit attribute) but only with a single value. Would it be better to have a switch so that any future updates will hit an error and not silently pass `concurrent`?

https://github.com/llvm/llvm-project/pull/96866


More information about the Mlir-commits mailing list