Skip to content

Commit 6332e2b

Browse files
authored
[MLIR] Add --allow-unregistered-dialect to mlir-reduce (#156245)
Fixes #155544
1 parent a6e6487 commit 6332e2b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mlir/lib/Tools/mlir-reduce/MlirReduceMain.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ LogicalResult mlir::mlirReduceMain(int argc, char **argv,
6565
"Disable implicit addition of a top-level module op during parsing"),
6666
llvm::cl::init(false)};
6767

68+
static llvm::cl::opt<bool> allowUnregisteredDialects(
69+
"allow-unregistered-dialect",
70+
llvm::cl::desc("Allow operation with no registered dialects"),
71+
llvm::cl::init(false));
72+
6873
llvm::cl::HideUnrelatedOptions(mlirReduceCategory);
6974

7075
llvm::InitLLVM y(argc, argv);
@@ -79,6 +84,8 @@ LogicalResult mlir::mlirReduceMain(int argc, char **argv,
7984
llvm::cl::PrintHelpMessage();
8085
return success();
8186
}
87+
if (allowUnregisteredDialects)
88+
context.allowUnregisteredDialects();
8289

8390
std::string errorMessage;
8491

0 commit comments

Comments
 (0)