[Mlir-commits] [mlir] 7de4587 - [mlir] NFC - Add AffineMinMaxOpBase getDim/SymbolOperands

Nicolas Vasilache llvmlistbot at llvm.org
Tue Jun 2 15:08:54 PDT 2020


Author: Nicolas Vasilache
Date: 2020-06-02T18:04:45-04:00
New Revision: 7de45878059a4e38dd6ceba43a058cee5d283b97

URL: https://github.com/llvm/llvm-project/commit/7de45878059a4e38dd6ceba43a058cee5d283b97
DIFF: https://github.com/llvm/llvm-project/commit/7de45878059a4e38dd6ceba43a058cee5d283b97.diff

LOG: [mlir] NFC - Add AffineMinMaxOpBase getDim/SymbolOperands

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Affine/IR/AffineOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
index 3366ef47a8be..9329f3dbcbc8 100644
--- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
+++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
@@ -460,6 +460,14 @@ class AffineMinMaxOpBase<string mnemonic, list<OpTrait> traits = []> :
     static StringRef getMapAttrName() { return "map"; }
     AffineMap getAffineMap() { return map(); }
     ValueRange getMapOperands() { return operands(); }
+    ValueRange getDimOperands() {
+      return OperandRange{operands().begin(),
+                        operands().begin() + map().getNumDims()};
+    }
+    ValueRange getSymbolOperands() {
+      return OperandRange{operands().begin() + map().getNumDims(),
+                        operands().end()};
+    }
   }];
   let verifier = [{ return ::verifyAffineMinMaxOp(*this); }];
   let printer = [{ return ::printAffineMinMaxOp(p, *this); }];


        


More information about the Mlir-commits mailing list