Skip to content

Commit

Permalink
Opt-in to the global dialect registry
Browse files Browse the repository at this point in the history
The default has changed to disable it upstream.

This is a temporary measure. #3036
makes us no longer dependent on the global registry, but there are
some ongoing discussions.

Part of #2958

PiperOrigin-RevId: 329523915
  • Loading branch information
GMNGeoffrey authored and iree-copybara-bot committed Sep 1, 2020
1 parent 051a9e2 commit fec9329
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bindings/python/pyiree/compiler/compiler.cc
Expand Up @@ -73,6 +73,7 @@ bool LLVMOnceInit() {
llvm::sys::DefaultOneShotPipeSignalHandler);
llvm::sys::PrintStackTraceOnErrorSignal("pyiree");

mlir::enableGlobalDialectRegistry(true);
// Register built-in MLIR dialects.
mlir::registerMlirDialects();

Expand Down
1 change: 1 addition & 0 deletions iree/samples/custom_modules/dialect/custom_opt.cc
Expand Up @@ -74,6 +74,7 @@ static llvm::cl::opt<bool> showDialects(
llvm::cl::init(false));

int main(int argc, char **argv) {
mlir::enableGlobalDialectRegistry(true);
mlir::DialectRegistry registry;
mlir::registerMlirDialects(registry);
mlir::registerMlirPasses();
Expand Down
1 change: 1 addition & 0 deletions iree/samples/custom_modules/dialect/custom_translate.cc
Expand Up @@ -56,6 +56,7 @@ static llvm::cl::opt<bool> splitInputFile(

int main(int argc, char **argv) {
llvm::InitLLVM y(argc, argv);
mlir::enableGlobalDialectRegistry(true);

mlir::registerMlirDialects();
mlir::registerXLADialects();
Expand Down
1 change: 1 addition & 0 deletions iree/tools/opt_main.cc
Expand Up @@ -76,6 +76,7 @@ static llvm::cl::opt<bool> showDialects(
llvm::cl::init(false));

int main(int argc, char **argv) {
mlir::enableGlobalDialectRegistry(true);
mlir::DialectRegistry registry;
mlir::registerMlirDialects(registry);
mlir::registerMlirPasses();
Expand Down
1 change: 1 addition & 0 deletions iree/tools/run_mlir_main.cc
Expand Up @@ -490,6 +490,7 @@ extern "C" int main(int argc, char** argv) {
}
}

mlir::enableGlobalDialectRegistry(true);
mlir::registerMlirDialects();
mlir::iree_compiler::registerIreeDialects();
mlir::iree_compiler::registerIreeCompilerModuleDialects();
Expand Down
1 change: 1 addition & 0 deletions iree/tools/translate_main.cc
Expand Up @@ -59,6 +59,7 @@ static llvm::cl::opt<bool> splitInputFile(

int main(int argc, char **argv) {
llvm::InitLLVM y(argc, argv);
mlir::enableGlobalDialectRegistry(true);

mlir::registerMlirDialects();
#ifdef IREE_HAVE_EMITC_DIALECT
Expand Down

0 comments on commit fec9329

Please sign in to comment.