[Mlir-commits] [mlir] 91362e5 - [mlir] Fix a warning

Kazu Hirata llvmlistbot at llvm.org
Thu Mar 16 13:03:07 PDT 2023


Author: Kazu Hirata
Date: 2023-03-16T13:02:55-07:00
New Revision: 91362e5d5e4d0b73e0e44195154e3b63ddefec38

URL: https://github.com/llvm/llvm-project/commit/91362e5d5e4d0b73e0e44195154e3b63ddefec38
DIFF: https://github.com/llvm/llvm-project/commit/91362e5d5e4d0b73e0e44195154e3b63ddefec38.diff

LOG: [mlir] Fix a warning

This patch fixes:

  mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp:479:13:
  error: unused variable 'tiledOp' [-Werror,-Wunused-variable]

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 4503d451a405c..407b8d213de1c 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -476,9 +476,12 @@ tileAndFuseFirstExtractUse(RewriterBase &rewriter, Diagnostic &diag,
         << "failed to tile producer op: " << *tileableProducer;
     return {};
   }
+
+#ifndef NDEBUG
   for (auto tiledOp : tileAndFuseResult->tiledOps) {
     LLVM_DEBUG(DBGS() << "tiledProducer: " << *tiledOp << "\n");
   }
+#endif
 
   // Replace the extract op.
   auto maybeRankReduced = tensor::ExtractSliceOp::rankReduceIfNeeded(


        


More information about the Mlir-commits mailing list