[PATCH] D73848: Add AffineMaxOp

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 2 12:14:14 PST 2020


nicolasvasilache added inline comments.


================
Comment at: mlir/include/mlir/Dialect/AffineOps/AffineOps.td:237
 
-def AffineMinOp : Affine_Op<"min"> {
+class Affine_ReduceOp <string mnemonic, list<OpTrait> traits = []> :
+    Op<Affine_Dialect, mnemonic, traits> {
----------------
this should be in a separate revision.


================
Comment at: mlir/lib/Dialect/AffineOps/AffineOps.cpp:1941
 
-static ParseResult parseAffineMinOp(OpAsmParser &parser,
-                                    OperationState &result) {
+template <typename T> static LogicalResult verifyReduceOp(T op) {
+  // Verify that operand count matches affine map dimension and symbol count.
----------------
this should be in a separate revision.


================
Comment at: mlir/lib/Dialect/AffineOps/AffineOps.cpp:2027
+
+OpFoldResult AffineMaxOp::fold(ArrayRef<Attribute> operands) {
+  // Fold the affine map.
----------------
this should be in a separate revision and have a test in canonicalize.mlir.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73848/new/

https://reviews.llvm.org/D73848





More information about the llvm-commits mailing list