[mlir-reduce] Support parsing operations other than 'builtin.module' as top-level
authorrkayaith <rkayaith@gmail.com>
Mon, 19 Sep 2022 20:59:31 +0000 (16:59 -0400)
committerrkayaith <rkayaith@gmail.com>
Mon, 3 Oct 2022 20:15:53 +0000 (16:15 -0400)
commit55300991b5ed574812db318742fd0de3887b54dd
tree1a1965b905a612645b9df35e779c9a5653ddbe69
parent21b638da6bc7427233c8e131919f3a6f9bfcfa25
[mlir-reduce] Support parsing operations other than 'builtin.module' as top-level

This adds a `--no-implicit-module` option, which disables the insertion
of a top-level `builtin.module` during parsing. Although other ops can
now be parsed as top-level, the actual reduction passes are still
restricted to `builtin.module` as it didn't seem straightforward to
update them.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D134242
mlir/lib/Reducer/ReductionTreePass.cpp
mlir/lib/Tools/mlir-reduce/MlirReduceMain.cpp
mlir/test/mlir-reduce/invalid.mlir [new file with mode: 0644]