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.
/*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) {