[Mlir-commits] [mlir] 421fabd - [mlir] Fix a warning

Kazu Hirata llvmlistbot at llvm.org
Wed Mar 1 09:42:38 PST 2023


Author: Kazu Hirata
Date: 2023-03-01T09:42:31-08:00
New Revision: 421fabd8649a12bc168684e72f781910ad11b96b

URL: https://github.com/llvm/llvm-project/commit/421fabd8649a12bc168684e72f781910ad11b96b
DIFF: https://github.com/llvm/llvm-project/commit/421fabd8649a12bc168684e72f781910ad11b96b.diff

LOG: [mlir] Fix a warning

This patch fixes:

  mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp:37:13: error:
  unused function 'debugPrintLoopInShortForm'
  [-Werror,-Wunused-function]

Added: 
    

Modified: 
    mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp b/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
index 6b56565eaf13..614efcaf1fce 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
@@ -34,6 +34,7 @@ using llvm::dbgs;
 using namespace mlir;
 using namespace mlir::linalg;
 
+#ifndef NDEBUG
 static bool debugPrintLoopInShortForm(Operation *op) {
   AsmState state(op->getParentOfType<func::FuncOp>());
   (void)state;
@@ -44,6 +45,7 @@ static bool debugPrintLoopInShortForm(Operation *op) {
   }
   return false;
 }
+#endif
 
 static void debugPrintBackwardSlice(SetVector<Operation *> &backwardSlice) {
   LLVM_DEBUG(llvm::interleaveComma(backwardSlice, DBGS() << "--backwardSlice:",


        


More information about the Mlir-commits mailing list