[Mlir-commits] [mlir] Add getters for multi dim loop variables in LoopLikeOpInterface (PR #94516)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jun 5 11:33:07 PDT 2024


================
@@ -2454,27 +2454,25 @@ bool AffineForOp::matchingBoundOperandList() {
 
 SmallVector<Region *> AffineForOp::getLoopRegions() { return {&getRegion()}; }
 
-std::optional<Value> AffineForOp::getSingleInductionVar() {
-  return getInductionVar();
-}
+ValueRange AffineForOp::getInductionVars() { return {getInductionVar()}; }
 
-std::optional<OpFoldResult> AffineForOp::getSingleLowerBound() {
+SmallVector<OpFoldResult> AffineForOp::getMixedLowerBound() {
   if (!hasConstantLowerBound())
-    return std::nullopt;
+    return {};
   OpBuilder b(getContext());
-  return OpFoldResult(b.getI64IntegerAttr(getConstantLowerBound()));
+  return {OpFoldResult(b.getI64IntegerAttr(getConstantLowerBound()))};
 }
----------------
srcarroll wrote:

i have a feeling this won't fly, so i'm happy to hear thoughts

https://github.com/llvm/llvm-project/pull/94516


More information about the Mlir-commits mailing list