Restore mlir-opt `--run-reproducer` option to opt-in running a reproducer
authorMehdi Amini <joker.eph@gmail.com>
Thu, 4 May 2023 16:40:56 +0000 (09:40 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Thu, 4 May 2023 18:08:03 +0000 (11:08 -0700)
commit7f00ba08aade787da6ef891156315698959e7af8
tree6fbc501ef055117a3a44cd50228660044dd08f84
parentb4692f29263006c7ea519c7b11c9082384f0af53
Restore mlir-opt `--run-reproducer` option to opt-in running a reproducer

When tooling out there produces a reproducer that is archived, the first thing
a user is likely to expect is to process this as they do with any MLIR file.
However https://reviews.llvm.org/D126447 changed the behavior of mlir-opt to
eliminate the `--run-reproducer` option and instead automatically run it when
present in the input file. This creates a discrepancy in how mlir-opt behaves
when fed with an input file, and is surprising for users.
The explicit passing of `--run-reproducer` to express user-intent seems more
in line with what is expected from `mlir-opt`.

Reviewed By: rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D149820
mlir/docs/PassManagement.md
mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
mlir/test/Pass/run-reproducer.mlir