brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 44b21b8 Raw
42 lines · cpp
1//===- mlir-reduce.cpp - The MLIR reducer ---------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// This file implements the general framework of the MLIR reducer tool. It10// parses the command line arguments, parses the initial MLIR test case and sets11// up the testing environment. It  outputs the most reduced test case variant12// after executing the reduction passes.13//14//===----------------------------------------------------------------------===//15 16#include "mlir/IR/Dialect.h"17#include "mlir/IR/MLIRContext.h"18#include "mlir/InitAllDialects.h"19#include "mlir/InitAllPasses.h"20#include "mlir/Tools/mlir-reduce/MlirReduceMain.h"21 22using namespace mlir;23 24namespace test {25#ifdef MLIR_INCLUDE_TESTS26void registerTestDialect(DialectRegistry &);27#endif28} // namespace test29 30int main(int argc, char **argv) {31  registerAllPasses();32 33  DialectRegistry registry;34  registerAllDialects(registry);35#ifdef MLIR_INCLUDE_TESTS36  test::registerTestDialect(registry);37#endif38  MLIRContext context(registry);39 40  return failed(mlirReduceMain(argc, argv, context));41}42