summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Statement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/Statement.cpp')
-rw-r--r--mlir/lib/IR/Statement.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/mlir/lib/IR/Statement.cpp b/mlir/lib/IR/Statement.cpp
index 7834d329832..b730e422465 100644
--- a/mlir/lib/IR/Statement.cpp
+++ b/mlir/lib/IR/Statement.cpp
@@ -350,6 +350,15 @@ void ForStmt::setConstantUpperBound(int64_t value) {
setUpperBound({}, AffineMap::getConstantMap(value, getContext()));
}
+ForStmt::operand_range ForStmt::getLowerBoundOperands() {
+ return {operand_begin(),
+ operand_begin() + getLowerBoundMap()->getNumInputs()};
+}
+
+ForStmt::operand_range ForStmt::getUpperBoundOperands() {
+ return {operand_begin() + getLowerBoundMap()->getNumInputs(), operand_end()};
+}
+
bool ForStmt::matchingBoundOperandList() const {
if (lbMap->getNumDims() != ubMap->getNumDims() ||
lbMap->getNumSymbols() != ubMap->getNumSymbols())
OpenPOWER on IntegriCloud