diff options
Diffstat (limited to 'mlir/lib/Transforms/Utils/Utils.cpp')
| -rw-r--r-- | mlir/lib/Transforms/Utils/Utils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/lib/Transforms/Utils/Utils.cpp b/mlir/lib/Transforms/Utils/Utils.cpp index d3689d056d6..819f1a59b6f 100644 --- a/mlir/lib/Transforms/Utils/Utils.cpp +++ b/mlir/lib/Transforms/Utils/Utils.cpp @@ -22,6 +22,7 @@ #include "mlir/Transforms/Utils.h" +#include "mlir/AffineOps/AffineOps.h" #include "mlir/Analysis/AffineAnalysis.h" #include "mlir/Analysis/AffineStructures.h" #include "mlir/Analysis/Dominance.h" @@ -278,8 +279,8 @@ void mlir::createAffineComputationSlice( /// Folds the specified (lower or upper) bound to a constant if possible /// considering its operands. Returns false if the folding happens for any of /// the bounds, true otherwise. -bool mlir::constantFoldBounds(ForInst *forInst) { - auto foldLowerOrUpperBound = [forInst](bool lower) { +bool mlir::constantFoldBounds(OpPointer<AffineForOp> forInst) { + auto foldLowerOrUpperBound = [&forInst](bool lower) { // Check if the bound is already a constant. if (lower && forInst->hasConstantLowerBound()) return true; |

