Index: mlir/include/mlir/Support/MlirOpt.h =================================================================== --- mlir/include/mlir/Support/MlirOpt.h +++ mlir/include/mlir/Support/MlirOpt.h @@ -1,4 +1,4 @@ -//===- MlirOptMain.h - MLIR Optimizer Driver main ---------------*- C++ -*-===// +//===- MlirOpt.h - MLIR Optimizer Driver main -------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -22,10 +22,10 @@ struct LogicalResult; class PassPipelineCLParser; -LogicalResult MlirOptMain(llvm::raw_ostream &os, - std::unique_ptr buffer, - const PassPipelineCLParser &passPipeline, - bool splitInputFile, bool verifyDiagnostics, - bool verifyPasses); +LogicalResult MlirOpt(llvm::raw_ostream &os, + std::unique_ptr buffer, + const PassPipelineCLParser &passPipeline, + bool splitInputFile, bool verifyDiagnostics, + bool verifyPasses); } // end namespace mlir Index: mlir/lib/Support/CMakeLists.txt =================================================================== --- mlir/lib/Support/CMakeLists.txt +++ mlir/lib/Support/CMakeLists.txt @@ -1,7 +1,7 @@ set(LLVM_OPTIONAL_SOURCES FileUtilities.cpp JitRunner.cpp - MlirOptMain.cpp + MlirOpt.cpp StorageUniquer.cpp ToolUtilities.cpp TranslateClParser.cpp @@ -17,13 +17,13 @@ ) target_link_libraries(MLIRSupport LLVMSupport ${LLVM_PTHREAD_LIB}) -add_llvm_library(MLIROptMain - MlirOptMain.cpp +add_llvm_library(MLIROpt + MlirOpt.cpp ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Support ) -target_link_libraries(MLIROptMain +target_link_libraries(MLIROpt MLIRPass LLVMSupport MLIRSupport Index: mlir/lib/Support/MlirOpt.cpp =================================================================== --- mlir/lib/Support/MlirOpt.cpp +++ mlir/lib/Support/MlirOpt.cpp @@ -1,4 +1,4 @@ -//===- MlirOptMain.cpp - MLIR Optimizer Driver ----------------------------===// +//===- MlirOpt.cpp - MLIR Optimizer Driver --------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "mlir/Support/MlirOptMain.h" +#include "mlir/Support/MlirOpt.h" #include "mlir/Analysis/Passes.h" #include "mlir/IR/Attributes.h" #include "mlir/IR/Diagnostics.h" @@ -96,11 +96,11 @@ return sourceMgrHandler.verify(); } -LogicalResult mlir::MlirOptMain(raw_ostream &os, - std::unique_ptr buffer, - const PassPipelineCLParser &passPipeline, - bool splitInputFile, bool verifyDiagnostics, - bool verifyPasses) { +LogicalResult mlir::MlirOpt(raw_ostream &os, + std::unique_ptr buffer, + const PassPipelineCLParser &passPipeline, + bool splitInputFile, bool verifyDiagnostics, + bool verifyPasses) { // The split-input-file mode is a very specific mode that slices the file // up into small pieces and checks each independently. if (splitInputFile) Index: mlir/tools/mlir-opt/CMakeLists.txt =================================================================== --- mlir/tools/mlir-opt/CMakeLists.txt +++ mlir/tools/mlir-opt/CMakeLists.txt @@ -10,10 +10,10 @@ MLIRTransforms MLIRSupport ) -add_llvm_library(MLIRMlirOptLib +add_llvm_library(MLIRMlirOpt mlir-opt.cpp ) -target_link_libraries(MLIRMlirOptLib ${LIB_LIBS}) +target_link_libraries(MLIRMlirOpt ${LIB_LIBS}) set(LIBS MLIRAnalysis @@ -34,7 +34,7 @@ MLIRLoopOps MLIRNVVMIR MLIROpenMP - MLIROptMain + MLIROpt MLIRParser MLIRPass MLIRQuantizerTransforms @@ -66,4 +66,4 @@ ) llvm_update_compile_flags(mlir-opt) whole_archive_link(mlir-opt ${LIBS}) -target_link_libraries(mlir-opt PRIVATE MLIRIR MLIRMlirOptLib ${LIBS} LLVMSupport) +target_link_libraries(mlir-opt PRIVATE MLIRIR MLIRMlirOpt ${LIBS} LLVMSupport) Index: mlir/tools/mlir-opt/mlir-opt.cpp =================================================================== --- mlir/tools/mlir-opt/mlir-opt.cpp +++ mlir/tools/mlir-opt/mlir-opt.cpp @@ -14,7 +14,7 @@ #include "mlir/Pass/Pass.h" #include "mlir/Pass/PassManager.h" #include "mlir/Support/FileUtilities.h" -#include "mlir/Support/MlirOptMain.h" +#include "mlir/Support/MlirOpt.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/InitLLVM.h" #include "llvm/Support/SourceMgr.h" @@ -71,6 +71,6 @@ exit(1); } - return failed(MlirOptMain(output->os(), std::move(file), passPipeline, - splitInputFile, verifyDiagnostics, verifyPasses)); + return failed(MlirOpt(output->os(), std::move(file), passPipeline, + splitInputFile, verifyDiagnostics, verifyPasses)); }