xref: /llvm-project/mlir/examples/minimal-opt/mlir-minimal-opt.cpp (revision e7f8b459532de54a8606c7d387ded7ccf5108cb5)
1*e7f8b459SMehdi Amini //===- mlir-minimal-opt.cpp -------------------------------------*- C++ -*-===//
2*e7f8b459SMehdi Amini //
3*e7f8b459SMehdi Amini // This file is licensed under the Apache License v2.0 with LLVM Exceptions.
4*e7f8b459SMehdi Amini // See https://llvm.org/LICENSE.txt for license information.
5*e7f8b459SMehdi Amini // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*e7f8b459SMehdi Amini //
7*e7f8b459SMehdi Amini //===----------------------------------------------------------------------===//
8*e7f8b459SMehdi Amini 
9*e7f8b459SMehdi Amini #include "mlir/Tools/mlir-opt/MlirOptMain.h"
10*e7f8b459SMehdi Amini 
11*e7f8b459SMehdi Amini /// This test includes the minimal amount of components for mlir-opt, that is
12*e7f8b459SMehdi Amini /// the CoreIR, the printer/parser, the bytecode reader/writer, the
13*e7f8b459SMehdi Amini /// passmanagement infrastructure and all the instrumentation.
main(int argc,char ** argv)14*e7f8b459SMehdi Amini int main(int argc, char **argv) {
15*e7f8b459SMehdi Amini   mlir::DialectRegistry registry;
16*e7f8b459SMehdi Amini   return mlir::asMainReturnCode(mlir::MlirOptMain(
17*e7f8b459SMehdi Amini       argc, argv, "Minimal Standalone optimizer driver\n", registry));
18*e7f8b459SMehdi Amini }
19