[Mlir-commits] [mlir] 4b414b8 - [mlir][scf] NFC - Add a getIterOpOperands helper to scf::ForOp

Nicolas Vasilache llvmlistbot at llvm.org
Thu Apr 15 14:49:36 PDT 2021


Author: Nicolas Vasilache
Date: 2021-04-15T21:46:10Z
New Revision: 4b414b84a971c60c0119b9301b7fcee6c0098f01

URL: https://github.com/llvm/llvm-project/commit/4b414b84a971c60c0119b9301b7fcee6c0098f01
DIFF: https://github.com/llvm/llvm-project/commit/4b414b84a971c60c0119b9301b7fcee6c0098f01.diff

LOG: [mlir][scf] NFC - Add a getIterOpOperands helper to scf::ForOp

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/SCF/SCFOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/SCF/SCFOps.td b/mlir/include/mlir/Dialect/SCF/SCFOps.td
index 1245102d4c3c..28348f083f16 100644
--- a/mlir/include/mlir/Dialect/SCF/SCFOps.td
+++ b/mlir/include/mlir/Dialect/SCF/SCFOps.td
@@ -171,6 +171,10 @@ def ForOp : SCF_Op<"for",
     Operation::operand_range getIterOperands() {
       return getOperands().drop_front(getNumControlOperands());
     }
+    MutableArrayRef<OpOperand> getIterOpOperands() {
+      return
+        getOperation()->getOpOperands().drop_front(getNumControlOperands());
+    }
 
     void setLowerBound(Value bound) { getOperation()->setOperand(0, bound); }
     void setUpperBound(Value bound) { getOperation()->setOperand(1, bound); }


        


More information about the Mlir-commits mailing list