[Mlir-commits] [mlir] 635cde6 - [mlir] Provide defaults to make enabling dumping simpler

Jacques Pienaar llvmlistbot at llvm.org
Tue Jun 2 10:47:26 PDT 2020


Author: Jacques Pienaar
Date: 2020-06-02T10:47:07-07:00
New Revision: 635cde6e8c082af1b499a84745f48f5ec59853b5

URL: https://github.com/llvm/llvm-project/commit/635cde6e8c082af1b499a84745f48f5ec59853b5
DIFF: https://github.com/llvm/llvm-project/commit/635cde6e8c082af1b499a84745f48f5ec59853b5.diff

LOG: [mlir] Provide defaults to make enabling dumping simpler

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

Added: 
    

Modified: 
    mlir/include/mlir/Pass/PassManager.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Pass/PassManager.h b/mlir/include/mlir/Pass/PassManager.h
index be5c5d5bcc22..7b06cf0084d8 100644
--- a/mlir/include/mlir/Pass/PassManager.h
+++ b/mlir/include/mlir/Pass/PassManager.h
@@ -19,6 +19,7 @@
 
 namespace llvm {
 class Any;
+raw_ostream &errs();
 } // end namespace llvm
 
 namespace mlir {
@@ -221,9 +222,12 @@ class PassManager : public OpPassManager {
   ///   potential mutations were made.
   /// * 'out' corresponds to the stream to output the printed IR to.
   void enableIRPrinting(
-      std::function<bool(Pass *, Operation *)> shouldPrintBeforePass,
-      std::function<bool(Pass *, Operation *)> shouldPrintAfterPass,
-      bool printModuleScope, bool printAfterOnlyOnChange, raw_ostream &out);
+      std::function<bool(Pass *, Operation *)> shouldPrintBeforePass =
+          [](Pass *, Operation *) { return true; },
+      std::function<bool(Pass *, Operation *)> shouldPrintAfterPass =
+          [](Pass *, Operation *) { return true; },
+      bool printModuleScope = true, bool printAfterOnlyOnChange = true,
+      raw_ostream &out = llvm::errs());
 
   //===--------------------------------------------------------------------===//
   // Pass Timing


        


More information about the Mlir-commits mailing list