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

This commit is contained in:
Nicolas Vasilache 2021-04-15 21:43:41 +00:00
parent b241f3cb29
commit 4b414b84a9
1 changed files with 4 additions and 0 deletions

View 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); }