1*e7f8b459SMehdi Amini //===- mlir-minimal-opt-canonicalize.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 #include "mlir/Transforms/Passes.h" 11*e7f8b459SMehdi Amini main(int argc,char ** argv)12*e7f8b459SMehdi Aminiint main(int argc, char **argv) { 13*e7f8b459SMehdi Amini // Register only the canonicalize pass 14*e7f8b459SMehdi Amini // This pulls in the pattern rewrite engine as well as the whole PDL 15*e7f8b459SMehdi Amini // compiler/intepreter. 16*e7f8b459SMehdi Amini mlir::registerCanonicalizerPass(); 17*e7f8b459SMehdi Amini 18*e7f8b459SMehdi Amini mlir::DialectRegistry registry; 19*e7f8b459SMehdi Amini return mlir::asMainReturnCode(mlir::MlirOptMain( 20*e7f8b459SMehdi Amini argc, argv, "Minimal Standalone optimizer driver\n", registry)); 21*e7f8b459SMehdi Amini } 22