diff --git a/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h b/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h --- a/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h +++ b/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h @@ -228,27 +228,6 @@ DialectRegistry ®istry, 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 buffer, - const PassPipelineCLParser &passPipeline, - DialectRegistry ®istry, 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 buffer, - PassPipelineFn passManagerSetupFn, DialectRegistry ®istry, - 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. diff --git a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp --- a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp +++ b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp @@ -427,45 +427,6 @@ /*insertMarkerInOutput=*/true); } -LogicalResult mlir::MlirOptMain(raw_ostream &outputStream, - std::unique_ptr buffer, - PassPipelineFn passManagerSetupFn, - DialectRegistry ®istry, 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 buffer, - const PassPipelineCLParser &passPipeline, DialectRegistry ®istry, - 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 ®istry, bool preloadDialectsInContext) {