This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add option to read reproducer options from file
ClosedPublic

Authored by jpienaar on Dec 29 2020, 3:04 PM.

Details

Summary

Add command line option to read the configuration dumped by the MLIR crash
reproducer and adds those to the other command line options parsed by mlir-opt.

Simple convenience that enables mlir-opt --run-reproducer /tmp/repro.mlir
instead of needing to copy&paste the configuration. It is very simple and
doesn't try to do anything advanced (e.g., configuration has to be in first
line, it only parses the configuration). Based parsing on EnvVar parsing in
ParseCommandLineOptions.

Diff Detail

Event Timeline

jpienaar created this revision.Dec 29 2020, 3:04 PM
jpienaar requested review of this revision.Dec 29 2020, 3:04 PM
mehdi_amini accepted this revision.Dec 29 2020, 5:43 PM
mehdi_amini added inline comments.
mlir/lib/Support/MlirOptMain.cpp
234
This revision is now accepted and ready to land.Dec 29 2020, 5:43 PM
This revision was landed with ongoing or failed builds.Dec 30 2020, 10:46 AM
This revision was automatically updated to reflect the committed changes.
jpienaar marked an inline comment as done.

This broke the windows mlir bot. Please fix it or revert it:

http://lab.llvm.org:8011/#/builders/13/builds/3327

Will fix shortly.

Just pushed change to not use /dev/null - I don't have a windows bot available but seeing as that was the complaint, should work.