diff --git a/src/compiler/tool/dlc_opt/dlc_opt.cpp b/src/compiler/tool/dlc_opt/dlc_opt.cpp deleted file mode 100644 index c2c976a..0000000 --- a/src/compiler/tool/dlc_opt/dlc_opt.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "src/compiler/helper.hpp" - -using namespace dlc; - -static llvm::cl::opt input_filename( - llvm::cl::Positional, llvm::cl::desc(""), llvm::cl::init("-")); - -static llvm::cl::opt output_filename("o", - llvm::cl::desc("Output filename"), llvm::cl::value_desc("filename"), - llvm::cl::init("-")); - -static llvm::cl::opt split_input_file("split-input-file", - llvm::cl::desc("Split the input file into pieces and process each " - "chunk independently"), - llvm::cl::init(false)); - -static llvm::cl::opt verify_diagnostics("verify-diagnostics", - llvm::cl::desc("Check that emitted diagnostics match " - "expected-* lines on the corresponding line"), - llvm::cl::init(false)); - -static llvm::cl::opt verify_passes("verify-each", - llvm::cl::desc("Run the verifier after each transformation pass"), - llvm::cl::init(true)); - -int main(int argc, char** argv) { - llvm::InitLLVM y(argc, argv); - - // Register any pass manager command line options. - mlir::registerPassManagerCLOptions(); - mlir::PassPipelineCLParser passPipeline("", "Compiler passes to run"); - llvm::cl::ParseCommandLineOptions( - argc, argv, "dlc MLIR modular optimizer driver\n"); - - // Set up the input file. - std::string error_message; - auto file = mlir::openInputFile(input_filename, &error_message); - DLC_REQUIRE_MSG(file, error_message) - - auto output = mlir::openOutputFile(output_filename, &error_message); - DLC_REQUIRE_MSG(output, error_message) - - mlir::registerDialect(); - - return failed(mlir::MlirOptMain(output->os(), std::move(file), passPipeline, - split_input_file, verify_diagnostics, verify_passes)); -} diff --git a/src/compiler/tool/dlc_opt/onnf_opt.cpp b/src/compiler/tool/dlc_opt/onnf_opt.cpp deleted file mode 100644 index fc46803..0000000 --- a/src/compiler/tool/dlc_opt/onnf_opt.cpp +++ /dev/null @@ -1,61 +0,0 @@ -//===---------------------- onnf-opt.cpp - MLIR Operations -----------------===// -// -// Copyright 2019 The IBM Research Authors. -// -// ============================================================================= -// -//===----------------------------------------------------------------------===// - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace onnf; - -static llvm::cl::opt input_filename( - llvm::cl::Positional, llvm::cl::desc(""), llvm::cl::init("-")); - -static llvm::cl::opt output_filename("o", - llvm::cl::desc("Output filename"), llvm::cl::value_desc("filename"), - llvm::cl::init("-")); - -static llvm::cl::opt split_input_file("split-input-file", - llvm::cl::desc("Split the input file into pieces and process each " - "chunk independently"), - llvm::cl::init(false)); - -static llvm::cl::opt verify_diagnostics("verify-diagnostics", - llvm::cl::desc("Check that emitted diagnostics match " - "expected-* lines on the corresponding line"), - llvm::cl::init(false)); - -static llvm::cl::opt verify_passes("verify-each", - llvm::cl::desc("Run the verifier after each transformation pass"), - llvm::cl::init(true)); - -int main(int argc, char** argv) { - llvm::InitLLVM y(argc, argv); - - // Register any pass manager command line options. - mlir::registerPassManagerCLOptions(); - mlir::PassPipelineCLParser passPipeline("", "Compiler passes to run"); - llvm::cl::ParseCommandLineOptions( - argc, argv, "onnf MLIR modular optimizer driver\n"); - - // Set up the input file. - std::string error_message; - auto file = mlir::openInputFile(input_filename, &error_message); - - auto output = mlir::openOutputFile(output_filename, &error_message); - - mlir::registerDialect(); - - return failed(mlir::MlirOptMain(output->os(), std::move(file), passPipeline, - split_input_file, verify_diagnostics, verify_passes)); -}