[Mlir-commits] [mlir] [MLIR] Move the `mlir-generate-reproducer` option to be a PassManager option instead of mlir-opt (PR #159004)

Mehdi Amini llvmlistbot at llvm.org
Thu Sep 25 04:01:26 PDT 2025


================
@@ -282,6 +282,11 @@ class PassManager : public OpPassManager {
   /// Add the provided instrumentation to the pass manager.
   void addInstrumentation(std::unique_ptr<PassInstrumentation> pi);
 
+  /// Enable or disable the printing of pass manager reproducer.
+  void enableGeneratePassManagerReproducer(std::string filename) {
----------------
joker-eph wrote:

>  Vs at that same spot just serializing the reproducer even before run.

It's not the same spot: there is a different between "setup code" and execution code in general.
Also this seems pretty fundamental to me to the notion of "reproducer": this prints the pass manager **and** the IR that is being processed.

Right now the documentation we have state:

> The [pass manager](#pass-manager) in MLIR contains a builtin mechanism to generate reproducibles in the event of a crash, or a [pass failure](#pass-failure). This functionality can be enabled via `PassManager::enableCrashReproducerGeneration` or via the command line flag `mlir-pass-pipeline-crash-reproducer`. 


Using a stream is a non-starter, but I can add an indirection with a stream factory though.




https://github.com/llvm/llvm-project/pull/159004


More information about the Mlir-commits mailing list