[flang-commits] [flang] [mlir][openacc][NFC] Remove useless OptionalAttr with UnitAttr (PR #68337)

Mehdi Amini via flang-commits flang-commits at lists.llvm.org
Thu Oct 5 11:00:11 PDT 2023


================
@@ -2981,9 +2981,8 @@ genACC(Fortran::lower::AbstractConverter &converter,
   std::stringstream routineOpName;
   routineOpName << accRoutinePrefix.str() << routineCounter++;
   auto routineOp = modBuilder.create<mlir::acc::RoutineOp>(
-      loc, routineOpName.str(), funcName, mlir::StringAttr{}, mlir::UnitAttr{},
-      mlir::UnitAttr{}, mlir::UnitAttr{}, mlir::UnitAttr{}, mlir::UnitAttr{},
-      mlir::UnitAttr{}, mlir::IntegerAttr{});
+      loc, routineOpName.str(), funcName, mlir::StringAttr{}, false, false,
+      false, false, false, false, mlir::IntegerAttr{});
----------------
joker-eph wrote:

We should "name" non-variable arguments, such as:

```
    loc, routineOpName.str(), funcName, /*bind_name=*/mlir::StringAttr{}, /*gang=*/false,
       /*worker=*/false, /*vector=*/false, /*seq=*/false, /*nohost=*/false,
      /*implicit=*/false, /*gangDim*/mlir::IntegerAttr{});
```

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


More information about the flang-commits mailing list