This is an archive of the discontinued LLVM Phabricator instance.

Restore mlir-opt `--run-reproducer` option to opt-in running a reproducer
ClosedPublic

Authored by mehdi_amini on May 3 2023, 11:56 PM.

Details

Summary

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.

Diff Detail

Event Timeline

mehdi_amini created this revision.May 3 2023, 11:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2023, 11:56 PM
mehdi_amini requested review of this revision.May 3 2023, 11:56 PM
rriddle accepted this revision.May 3 2023, 11:58 PM
This revision is now accepted and ready to land.May 3 2023, 11:58 PM
jpienaar accepted this revision.May 4 2023, 4:56 AM
rkayaith added inline comments.
mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
119

docstring needs updating

mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
261–263

Can you guard the reproOptions.attachResourceParser(parseConfig) line instead/as well, right now the resource would be "consumed" even if unused, and won't appear in the output IR.

This revision was automatically updated to reflect the committed changes.
mehdi_amini marked an inline comment as done.
mehdi_amini marked an inline comment as done.May 5 2023, 6:01 PM