66//
77// ===----------------------------------------------------------------------===//
88
9+ #include < utility>
10+
911#include " mlir/Dialect/Arith/Transforms/Transforms.h"
1012
1113#include " mlir/Dialect/Arith/IR/Arith.h"
@@ -69,7 +71,8 @@ FailureOr<OpFoldResult> mlir::arith::reifyValueBound(
6971 AffineMap boundMap;
7072 ValueDimList mapOperands;
7173 if (failed (ValueBoundsConstraintSet::computeBound (
72- boundMap, mapOperands, type, var, stopCondition, closedUB)))
74+ boundMap, mapOperands, type, var, std::move (stopCondition),
75+ closedUB)))
7376 return failure ();
7477
7578 // Materialize tensor.dim/memref.dim ops.
@@ -116,7 +119,7 @@ FailureOr<OpFoldResult> mlir::arith::reifyValueBound(
116119
117120FailureOr<OpFoldResult> mlir::arith::reifyShapedValueDimBound (
118121 OpBuilder &b, Location loc, presburger::BoundType type, Value value,
119- int64_t dim, ValueBoundsConstraintSet::StopConditionFn stopCondition,
122+ int64_t dim, const ValueBoundsConstraintSet::StopConditionFn & stopCondition,
120123 bool closedUB) {
121124 auto reifyToOperands = [&](Value v, std::optional<int64_t > d,
122125 ValueBoundsConstraintSet &cstr) {
@@ -134,7 +137,8 @@ FailureOr<OpFoldResult> mlir::arith::reifyShapedValueDimBound(
134137
135138FailureOr<OpFoldResult> mlir::arith::reifyIndexValueBound (
136139 OpBuilder &b, Location loc, presburger::BoundType type, Value value,
137- ValueBoundsConstraintSet::StopConditionFn stopCondition, bool closedUB) {
140+ const ValueBoundsConstraintSet::StopConditionFn &stopCondition,
141+ bool closedUB) {
138142 auto reifyToOperands = [&](Value v, std::optional<int64_t > d,
139143 ValueBoundsConstraintSet &cstr) {
140144 return v != value;
0 commit comments