[Mlir-commits] [mlir] df950a0 - [mlir] Fix a warning
Kazu Hirata
llvmlistbot at llvm.org
Tue Jan 17 13:01:28 PST 2023
Author: Kazu Hirata
Date: 2023-01-17T13:01:22-08:00
New Revision: df950a04d5add13a649ecbd9feb858d64ad455ae
URL: https://github.com/llvm/llvm-project/commit/df950a04d5add13a649ecbd9feb858d64ad455ae
DIFF: https://github.com/llvm/llvm-project/commit/df950a04d5add13a649ecbd9feb858d64ad455ae.diff
LOG: [mlir] Fix a warning
This patch fixes:
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp:820:13:
error: unused function 'hasAtMostOneResultFunctionOfDim'
[-Werror,-Wunused-function]
Added:
Modified:
mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index 3a33e0483e8c6..c2eafcf5048f7 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -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.
More information about the Mlir-commits
mailing list