[PATCH] D80818: [mlir] Provide defaults to make enabling dumping simpler
Jacques Pienaar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 29 10:21:26 PDT 2020
jpienaar created this revision.
jpienaar added a reviewer: rriddle.
Herald added subscribers: llvm-commits, jurahul, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, mehdi_amini.
Herald added a project: LLVM.
This adds some default values to enableIRPrinting so that it is simpler to enable it for a given pass manager. I kept on finding myself duplicating pretty much this call every time I wanted to do a quick debug run.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80818
Files:
mlir/include/mlir/Pass/PassManager.h
Index: mlir/include/mlir/Pass/PassManager.h
===================================================================
--- mlir/include/mlir/Pass/PassManager.h
+++ 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 @@
/// 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80818.267284.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200529/e1f6935b/attachment.bin>
More information about the llvm-commits
mailing list