From 839d81862f40f90943ab48e0cc472ad92dea3e3d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 10 Nov 2021 21:21:32 -0800 Subject: [PATCH] [ComprehensiveBufferize] Fix a warning This patch fixes: mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp:301:20: error: unused function 'printValueInfo' [-Werror,-Wunused-function] --- .../Linalg/ComprehensiveBufferize/ComprehensiveBufferize.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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.