[flang-commits] [flang] [flang] Add reductions for CUF Kernels: Lowering (PR #95184)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Tue Jun 11 17:46:19 PDT 2024


================
@@ -260,9 +263,27 @@ def cuf_KernelOp : cuf_Op<"kernel", [AttrSizedOperandSegments,
         ( `,` `stream` `=` $stream^ )? `>` `>` `>`
         custom<CUFKernelLoopControl>($region, $lowerbound, type($lowerbound),
             $upperbound, type($upperbound), $step, type($step))
+        `reduce_oprnds` $reduceOperands `:` type($reduceOperands)
----------------
clementval wrote:

```suggestion
        `reduce` `(` $reduceOperands `:` type($reduceOperands) `)`
```

To look more like other operations in CUF/FIR/OpenACC dialects.  Also I would remove `_oprnds` since we know these are operands anyway. 

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


More information about the flang-commits mailing list