[Mlir-commits] [mlir] ffd6f6b - Remove deprecated entry point for MlirOptMain
Mehdi Amini
llvmlistbot at llvm.org
Mon Apr 24 14:37:44 PDT 2023
Author: Mehdi Amini
Date: 2023-04-24T14:37:31-07:00
New Revision: ffd6f6b91a3863bed19f1c1e2ae5efea80db566e
URL: https://github.com/llvm/llvm-project/commit/ffd6f6b91a3863bed19f1c1e2ae5efea80db566e
DIFF: https://github.com/llvm/llvm-project/commit/ffd6f6b91a3863bed19f1c1e2ae5efea80db566e.diff
LOG: Remove deprecated entry point for MlirOptMain
See: https://discourse.llvm.org/t/psa-migrating-mlir-opt-like-tools-to-use-mliroptmainconfig/68991
Differential Revision: https://reviews.llvm.org/D149038
Added:
Modified:
mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h b/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
index 02b0eb098f954..ca6d78f407aa8 100644
--- a/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
+++ b/mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
@@ -216,27 +216,6 @@ LogicalResult MlirOptMain(llvm::raw_ostream &outputStream,
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<llvm::MemoryBuffer> 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<llvm::MemoryBuffer> 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
index 5112d2459d3f9..23a19635945dd 100644
--- a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
+++ b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
@@ -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 ®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<MemoryBuffer> 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) {
More information about the Mlir-commits
mailing list