[Mlir-commits] [mlir] 74aec6b - [mlir] make transform interpreter debug spew less verbose

Alex Zinenko llvmlistbot at llvm.org
Tue Apr 11 08:34:37 PDT 2023


Author: Alex Zinenko
Date: 2023-04-11T15:34:30Z
New Revision: 74aec6b428f3bea8202c6f4e715405968c5a000d

URL: https://github.com/llvm/llvm-project/commit/74aec6b428f3bea8202c6f4e715405968c5a000d
DIFF: https://github.com/llvm/llvm-project/commit/74aec6b428f3bea8202c6f4e715405968c5a000d.diff

LOG: [mlir] make transform interpreter debug spew less verbose

In particular, move the printing of the top-level payload after each
transform under the "full output" debug flag, it is rarely useful and
excessively long. Also don't print the regions of the transform
operation being applied as each individual operation in the region is
likely going to be applied later by itself and therefore printed.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D148014

Added: 
    

Modified: 
    mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp b/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
index c4e868ef6742c..0f49065a70161 100644
--- a/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
+++ b/mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
@@ -669,8 +669,14 @@ checkRepeatedConsumptionInOperand(ArrayRef<T> payload,
 
 DiagnosedSilenceableFailure
 transform::TransformState::applyTransform(TransformOpInterface transform) {
-  LLVM_DEBUG(DBGS() << "\n"; DBGS() << "applying: " << transform << "\n");
-  LLVM_DEBUG(DBGS() << "On top-level payload:\n" << *getTopLevel(););
+  LLVM_DEBUG({
+    DBGS() << "applying: ";
+    transform->print(llvm::dbgs(), OpPrintingFlags().skipRegions());
+    llvm::dbgs() << "\n";
+  });
+  DEBUG_WITH_TYPE(DEBUG_TYPE_FULL,
+                  DBGS() << "Top-level payload before application:\n"
+                         << *getTopLevel() << "\n");
   auto printOnFailureRAII = llvm::make_scope_exit([this] {
     (void)this;
     LLVM_DEBUG(DBGS() << "Failing Top-level payload:\n"; getTopLevel()->print(


        


More information about the Mlir-commits mailing list