[Mlir-commits] [mlir] 839d818 - [ComprehensiveBufferize] Fix a warning
Kazu Hirata
llvmlistbot at llvm.org
Wed Nov 10 21:21:41 PST 2021
Author: Kazu Hirata
Date: 2021-11-10T21:21:32-08:00
New Revision: 839d81862f40f90943ab48e0cc472ad92dea3e3d
URL: https://github.com/llvm/llvm-project/commit/839d81862f40f90943ab48e0cc472ad92dea3e3d
DIFF: https://github.com/llvm/llvm-project/commit/839d81862f40f90943ab48e0cc472ad92dea3e3d.diff
LOG: [ComprehensiveBufferize] Fix a warning
This patch fixes:
mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp:301:20:
error: unused function 'printValueInfo' [-Werror,-Wunused-function]
Added:
Modified:
mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp
index 1fadf149f164..ba94049bdfb8 100644
--- a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp
+++ b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp
@@ -138,8 +138,10 @@ using namespace comprehensive_bufferize;
#define LDBG(X) LLVM_DEBUG(DBGS() << X)
// Forward declarations.
+#ifndef NDEBUG
static std::string printOperationInfo(Operation *, bool prefix = true);
static std::string printValueInfo(Value, bool prefix = true);
+#endif
//===----------------------------------------------------------------------===//
// Generic helpers.
@@ -266,6 +268,7 @@ static void removeBufferizationFuncArguments(BlockArgument bbArg) {
// Printing helpers.
//===----------------------------------------------------------------------===//
+#ifndef NDEBUG
/// Helper method printing the bufferization information of a buffer / tensor.
static void printTensorOrBufferInfo(std::string prefix, Value value,
AsmState &state, llvm::raw_ostream &os) {
@@ -310,6 +313,7 @@ static std::string printValueInfo(Value value, bool prefix) {
printTensorOrBufferInfo("\n\t - ", value, state, os);
return result;
}
+#endif
//===----------------------------------------------------------------------===//
// Bufferization-specific alias analysis.
More information about the Mlir-commits
mailing list