[flang-commits] [flang] [Flang][OpenMP] Lowering Order clause to MLIR (PR #96730)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Wed Jun 26 04:28:51 PDT 2024


================
@@ -394,6 +394,29 @@ bool ClauseProcessor::processNumThreads(
   return false;
 }
 
+bool ClauseProcessor::processOrder(mlir::omp::OrderClauseOps &result) const {
+  if (auto *clause = findUniqueClause<omp::clause::Order>()) {
+    fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
+    result.orderAttr = mlir::omp::ClauseOrderKindAttr::get(
+        firOpBuilder.getContext(), mlir::omp::ClauseOrderKind::Concurrent);
+    using Order = omp::clause::Order;
+    const auto &modifier =
+        std::get<std::optional<Order::OrderModifier>>(clause->t);
+    if (modifier &&
+        *modifier == omp::clause::Order::OrderModifier::Unconstrained) {
----------------
skatrak wrote:

```suggestion
        *modifier == Order::OrderModifier::Unconstrained) {
```

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


More information about the flang-commits mailing list