[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / mlir / tools / mlir-cpu-runner / mlir-cpu-runner.cpp
blob1b1d5d03d2be5d652b398c5e3717f7b671c52308
1 //===- mlir-cpu-runner.cpp - MLIR CPU Execution Driver---------------------===//
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Main entry point to a command line utility that executes an MLIR file on the
10 // CPU by translating MLIR to LLVM IR before JIT-compiling and executing the
11 // latter.
13 //===----------------------------------------------------------------------===//
15 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
16 #include "mlir/ExecutionEngine/JitRunner.h"
17 #include "mlir/ExecutionEngine/OptUtils.h"
18 #include "mlir/IR/Dialect.h"
19 #include "mlir/Target/LLVMIR/Dialect/All.h"
21 #include "llvm/Support/InitLLVM.h"
22 #include "llvm/Support/TargetSelect.h"
24 int main(int argc, char **argv) {
25 llvm::InitLLVM y(argc, argv);
26 llvm::InitializeNativeTarget();
27 llvm::InitializeNativeTargetAsmPrinter();
28 llvm::InitializeNativeTargetAsmParser();
30 mlir::DialectRegistry registry;
31 mlir::registerAllToLLVMIRTranslations(registry);
33 return mlir::JitRunnerMain(argc, argv, registry);