[Mlir-commits] [mlir] [mlir][OpenMP] inscan reduction modifier and scan op mlir support (PR #114737)

Sergio Afonso llvmlistbot at llvm.org
Fri Dec 6 05:02:42 PST 2024


================
@@ -178,6 +178,27 @@ def OrderModifier
 def OrderModifierAttr : EnumAttr<OpenMP_Dialect, OrderModifier,
                                     "order_mod">;
 
+//===----------------------------------------------------------------------===//
+// reduction_modifier enum.
+//===----------------------------------------------------------------------===//
+
+def ReductionModifierDefault : I32EnumAttrCase<"Default", 0>;
+def ReductionModifierInScan : I32EnumAttrCase<"InScan", 1>;
+def ReductionModifierTask : I32EnumAttrCase<"Task", 2>;
----------------
skatrak wrote:

Nit: To follow naming conventions of the dialect (https://mlir.llvm.org/docs/Dialects/OpenMPDialect/#operation-naming-conventions).
```suggestion
def ReductionModifierDefault : I32EnumAttrCase<"default", 0>;
def ReductionModifierInScan : I32EnumAttrCase<"inscan", 1>;
def ReductionModifierTask : I32EnumAttrCase<"task", 2>;
```

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


More information about the Mlir-commits mailing list