Remove deprecated entry point for MlirOptMain
authorMehdi Amini <joker.eph@gmail.com>
Mon, 24 Apr 2023 05:15:32 +0000 (22:15 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 24 Apr 2023 21:37:31 +0000 (14:37 -0700)
See: https://discourse.llvm.org/t/psa-migrating-mlir-opt-like-tools-to-use-mliroptmainconfig/68991

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

mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
mlir/lib/Tools/mlir-opt/MlirOptMain.cpp

index 02b0eb0..ca6d78f 100644 (file)
@@ -216,27 +216,6 @@ LogicalResult MlirOptMain(llvm::raw_ostream &outputStream,
                           DialectRegistry &registry,
                           const MlirOptMainConfig &config);
 
-/// Perform the core processing behind `mlir-opt`.
-/// This API is deprecated, use the MlirOptMainConfig version above instead.
-LogicalResult MlirOptMain(llvm::raw_ostream &outputStream,
-                          std::unique_ptr<llvm::MemoryBuffer> buffer,
-                          const PassPipelineCLParser &passPipeline,
-                          DialectRegistry &registry, bool splitInputFile,
-                          bool verifyDiagnostics, bool verifyPasses,
-                          bool allowUnregisteredDialects,
-                          bool preloadDialectsInContext = false,
-                          bool emitBytecode = false, bool explicitModule = true,
-                          bool dumpPassPipeline = false);
-
-/// Perform the core processing behind `mlir-opt`.
-/// This API is deprecated, use the MlirOptMainConfig version above instead.
-LogicalResult MlirOptMain(
-    llvm::raw_ostream &outputStream, std::unique_ptr<llvm::MemoryBuffer> buffer,
-    PassPipelineFn passManagerSetupFn, DialectRegistry &registry,
-    bool splitInputFile, bool verifyDiagnostics, bool verifyPasses,
-    bool allowUnregisteredDialects, bool preloadDialectsInContext = false,
-    bool emitBytecode = false, bool explicitModule = true);
-
 /// Implementation for tools like `mlir-opt`.
 /// - toolName is used for the header displayed by `--help`.
 /// - registry should contain all the dialects that can be parsed in the source.
index 5112d24..23a1963 100644 (file)
@@ -362,45 +362,6 @@ LogicalResult mlir::MlirOptMain(llvm::raw_ostream &outputStream,
                                /*insertMarkerInOutput=*/true);
 }
 
-LogicalResult mlir::MlirOptMain(raw_ostream &outputStream,
-                                std::unique_ptr<MemoryBuffer> buffer,
-                                PassPipelineFn passManagerSetupFn,
-                                DialectRegistry &registry, bool splitInputFile,
-                                bool verifyDiagnostics, bool verifyPasses,
-                                bool allowUnregisteredDialects,
-                                bool preloadDialectsInContext,
-                                bool emitBytecode, bool explicitModule) {
-  return MlirOptMain(outputStream, std::move(buffer), registry,
-                     MlirOptMainConfig{}
-                         .splitInputFile(splitInputFile)
-                         .verifyDiagnostics(verifyDiagnostics)
-                         .verifyPasses(verifyPasses)
-                         .allowUnregisteredDialects(allowUnregisteredDialects)
-                         .preloadDialectsInContext(preloadDialectsInContext)
-                         .emitBytecode(emitBytecode)
-                         .useExplicitModule(explicitModule)
-                         .setPassPipelineSetupFn(passManagerSetupFn));
-}
-
-LogicalResult mlir::MlirOptMain(
-    raw_ostream &outputStream, std::unique_ptr<MemoryBuffer> buffer,
-    const PassPipelineCLParser &passPipeline, DialectRegistry &registry,
-    bool splitInputFile, bool verifyDiagnostics, bool verifyPasses,
-    bool allowUnregisteredDialects, bool preloadDialectsInContext,
-    bool emitBytecode, bool explicitModule, bool dumpPassPipeline) {
-  return MlirOptMain(outputStream, std::move(buffer), registry,
-                     MlirOptMainConfig{}
-                         .splitInputFile(splitInputFile)
-                         .verifyDiagnostics(verifyDiagnostics)
-                         .verifyPasses(verifyPasses)
-                         .allowUnregisteredDialects(allowUnregisteredDialects)
-                         .preloadDialectsInContext(preloadDialectsInContext)
-                         .emitBytecode(emitBytecode)
-                         .useExplicitModule(explicitModule)
-                         .dumpPassPipeline(dumpPassPipeline)
-                         .setPassPipelineParser(passPipeline));
-}
-
 LogicalResult mlir::MlirOptMain(int argc, char **argv, llvm::StringRef toolName,
                                 DialectRegistry &registry,
                                 bool preloadDialectsInContext) {