[flang-commits] [flang] [flang][acc] Add support for lowering combined constructs (PR #80321)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Thu Feb 1 11:59:12 PST 2024


================
@@ -2079,14 +2085,13 @@ static void genDataOperandOperationsWithModifier(
 }
 
 template <typename Op>
-static Op
-createComputeOp(Fortran::lower::AbstractConverter &converter,
-                mlir::Location currentLocation,
-                Fortran::lower::pft::Evaluation &eval,
-                Fortran::semantics::SemanticsContext &semanticsContext,
-                Fortran::lower::StatementContext &stmtCtx,
-                const Fortran::parser::AccClauseList &accClauseList,
-                bool outerCombined = false) {
+static Op createComputeOp(
+    Fortran::lower::AbstractConverter &converter,
+    mlir::Location currentLocation, Fortran::lower::pft::Evaluation &eval,
+    Fortran::semantics::SemanticsContext &semanticsContext,
+    Fortran::lower::StatementContext &stmtCtx,
+    const Fortran::parser::AccClauseList &accClauseList,
+    std::optional<mlir::acc::CombinedConstructsType> combinedConstructs) {
----------------
clementval wrote:

```suggestion
    std::optional<mlir::acc::CombinedConstructsType> combinedConstructs = std::nullopt) {
```

So we don't need to pass `{}` when there is not combined construct. 

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


More information about the flang-commits mailing list