[flang-commits] [flang] [Flang][OpenMP][Lower] Add lowering support of OpenMP distribute to MLIR (PR #67798)

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Thu Jan 25 05:05:05 PST 2024


================
@@ -1490,6 +1493,19 @@ bool ClauseProcessor::processDeviceType(
   return false;
 }
 
+bool ClauseProcessor::processDistSchedule(
+    Fortran::lower::StatementContext &stmtCtx, mlir::UnitAttr &scheduleStatic,
+    mlir::Value &chunkSize) const {
+  if (auto *distScheduleClause = findUniqueClause<ClauseTy::DistSchedule>()) {
+    scheduleStatic = converter.getFirOpBuilder().getUnitAttr();
+    if (const auto *expr = Fortran::semantics::GetExpr(distScheduleClause->v)) {
+      chunkSize = fir::getBase(converter.genExprValue(*expr, stmtCtx));
+    }
----------------
TIFitis wrote:

Nit: Remove braces
```suggestion
    if (const auto *expr = Fortran::semantics::GetExpr(distScheduleClause->v))
      chunkSize = fir::getBase(converter.genExprValue(*expr, stmtCtx));
```

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


More information about the flang-commits mailing list