My Project
JitRunner.h
Go to the documentation of this file.
1 //===- JitRunner.h - MLIR CPU Execution Driver Library ----------*- C++ -*-===//
2 //
3 // Part of the MLIR 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 // This is a library that provides a shared implementation for command line
10 // utilities that execute an MLIR file on the CPU by translating MLIR to LLVM
11 // IR before JIT-compiling and executing the latter.
12 //
13 // The translation can be customized by providing an MLIR to MLIR
14 // transformation.
15 //
16 //===----------------------------------------------------------------------===//
17 
18 #ifndef MLIR_SUPPORT_JITRUNNER_H_
19 #define MLIR_SUPPORT_JITRUNNER_H_
20 
21 #include "llvm/ADT/STLExtras.h"
22 
23 namespace mlir {
24 
25 class ModuleOp;
26 struct LogicalResult;
27 
28 // Entry point for all CPU runners. Expects the common argc/argv arguments for
29 // standard C++ main functions and an mlirTransformer.
30 // The latter is applied after parsing the input into MLIR IR and before passing
31 // the MLIR module to the ExecutionEngine.
32 int JitRunnerMain(
33  int argc, char **argv,
34  llvm::function_ref<LogicalResult(mlir::ModuleOp)> mlirTransformer);
35 
36 } // namespace mlir
37 
38 #endif // MLIR_SUPPORT_JITRUNNER_H_
Definition: InferTypeOpInterface.cpp:20
Definition: LLVM.h:49
Definition: Module.h:29
int JitRunnerMain(int argc, char **argv, llvm::function_ref< LogicalResult(mlir::ModuleOp)> mlirTransformer)