[Mlir-commits] [mlir] eb7f5ea - Change the default value for `preloadDialectsInContext` for MlirOptMain

Mehdi Amini llvmlistbot at llvm.org
Wed Apr 7 22:05:29 PDT 2021


Author: Mehdi Amini
Date: 2021-04-08T05:05:10Z
New Revision: eb7f5eaf3500fd0502a8ee56cc227432430c382b

URL: https://github.com/llvm/llvm-project/commit/eb7f5eaf3500fd0502a8ee56cc227432430c382b
DIFF: https://github.com/llvm/llvm-project/commit/eb7f5eaf3500fd0502a8ee56cc227432430c382b.diff

LOG: Change the default value for `preloadDialectsInContext` for MlirOptMain

This option has been deprecated for 6 months, change the default setting for now before
future removal.

While clients can set the option to true for now, they should start
updating their passes to define the right `dependentDialects` in
preparation of the removal of this option. See the FAQ for more info:
https://mlir.llvm.org/getting_started/Faq/

Reviewed By: rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D99025

Added: 
    

Modified: 
    mlir/include/mlir/Support/MlirOptMain.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Support/MlirOptMain.h b/mlir/include/mlir/Support/MlirOptMain.h
index 71d47317571e..8924e479b950 100644
--- a/mlir/include/mlir/Support/MlirOptMain.h
+++ b/mlir/include/mlir/Support/MlirOptMain.h
@@ -49,7 +49,7 @@ LogicalResult MlirOptMain(llvm::raw_ostream &outputStream,
                           DialectRegistry &registry, bool splitInputFile,
                           bool verifyDiagnostics, bool verifyPasses,
                           bool allowUnregisteredDialects,
-                          bool preloadDialectsInContext = true);
+                          bool preloadDialectsInContext = false);
 
 /// Implementation for tools like `mlir-opt`.
 /// - toolName is used for the header displayed by `--help`.
@@ -59,7 +59,7 @@ LogicalResult MlirOptMain(llvm::raw_ostream &outputStream,
 ///   deprecated and will be removed soon.
 LogicalResult MlirOptMain(int argc, char **argv, llvm::StringRef toolName,
                           DialectRegistry &registry,
-                          bool preloadDialectsInContext = true);
+                          bool preloadDialectsInContext = false);
 
 } // end namespace mlir
 


        


More information about the Mlir-commits mailing list