[mlir][scf] NFC - Add a getIterOpOperands helper to scf::ForOp
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Thu, 15 Apr 2021 21:43:41 +0000 (21:43 +0000)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Thu, 15 Apr 2021 21:46:10 +0000 (21:46 +0000)
mlir/include/mlir/Dialect/SCF/SCFOps.td

index 1245102..28348f0 100644 (file)
@@ -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); }