[mlir] Fix a warning

This patch fixes:

  mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp:820:13:
  error: unused function 'hasAtMostOneResultFunctionOfDim'
  [-Werror,-Wunused-function]
This commit is contained in:
Kazu Hirata
2023-01-17 13:01:22 -08:00
parent b8b756c6f1
commit df950a04d5

View File

@@ -816,6 +816,7 @@ SmallVector<OpFoldResult> transform::PackOp::getMixedPackedSizes() {
return getMixedValues(getStaticPackedSizes(), getPackedSizes(), b);
}
#ifndef NDEBUG
/// Return true if `map` has 0 or 1 result function of AffineDimExpr(dim).
static bool hasAtMostOneResultFunctionOfDim(AffineMap map, int64_t dim) {
bool found = false;
@@ -828,6 +829,7 @@ static bool hasAtMostOneResultFunctionOfDim(AffineMap map, int64_t dim) {
}
return true;
}
#endif // NDEBUG
/// Return the index of the first result of `map` that is a function of
/// AffineDimExpr(dim), std::nullopt otherwise.