6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
+ #include < utility>
10
+
9
11
#include " mlir/Dialect/Arith/Transforms/Transforms.h"
10
12
11
13
#include " mlir/Dialect/Arith/IR/Arith.h"
@@ -69,7 +71,8 @@ FailureOr<OpFoldResult> mlir::arith::reifyValueBound(
69
71
AffineMap boundMap;
70
72
ValueDimList mapOperands;
71
73
if (failed (ValueBoundsConstraintSet::computeBound (
72
- boundMap, mapOperands, type, var, stopCondition, closedUB)))
74
+ boundMap, mapOperands, type, var, std::move (stopCondition),
75
+ closedUB)))
73
76
return failure ();
74
77
75
78
// Materialize tensor.dim/memref.dim ops.
@@ -116,7 +119,7 @@ FailureOr<OpFoldResult> mlir::arith::reifyValueBound(
116
119
117
120
FailureOr<OpFoldResult> mlir::arith::reifyShapedValueDimBound (
118
121
OpBuilder &b, Location loc, presburger::BoundType type, Value value,
119
- int64_t dim, ValueBoundsConstraintSet::StopConditionFn stopCondition,
122
+ int64_t dim, const ValueBoundsConstraintSet::StopConditionFn & stopCondition,
120
123
bool closedUB) {
121
124
auto reifyToOperands = [&](Value v, std::optional<int64_t > d,
122
125
ValueBoundsConstraintSet &cstr) {
@@ -134,7 +137,8 @@ FailureOr<OpFoldResult> mlir::arith::reifyShapedValueDimBound(
134
137
135
138
FailureOr<OpFoldResult> mlir::arith::reifyIndexValueBound (
136
139
OpBuilder &b, Location loc, presburger::BoundType type, Value value,
137
- ValueBoundsConstraintSet::StopConditionFn stopCondition, bool closedUB) {
140
+ const ValueBoundsConstraintSet::StopConditionFn &stopCondition,
141
+ bool closedUB) {
138
142
auto reifyToOperands = [&](Value v, std::optional<int64_t > d,
139
143
ValueBoundsConstraintSet &cstr) {
140
144
return v != value;
0 commit comments