MLIR
21.0.0git
|
#include "mlir/ExecutionEngine/JitRunner.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/ExecutionEngine/ExecutionEngine.h"
#include "mlir/ExecutionEngine/OptUtils.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/Parser/Parser.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Tools/ParseUtilities.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h"
#include "llvm/ExecutionEngine/Orc/LLJIT.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassNameParser.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/ToolOutputFile.h"
#include <cstdint>
#include <numeric>
#include <optional>
#include <utility>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "jit-runner" |
Functions | |
static OwningOpRef< Operation * > | parseMLIRInput (StringRef inputFilename, bool insertImplicitModule, MLIRContext *context) |
static Error | makeStringError (const Twine &message) |
static std::optional< unsigned > | getCommandLineOptLevel (Options &options) |
static Error | compileAndExecute (Options &options, Operation *module, StringRef entryPoint, CompileAndExecuteConfig config, void **args, std::unique_ptr< llvm::TargetMachine > tm=nullptr) |
static Error | compileAndExecuteVoidFunction (Options &options, Operation *module, StringRef entryPoint, CompileAndExecuteConfig config, std::unique_ptr< llvm::TargetMachine > tm) |
template<typename Type > | |
Error | checkCompatibleReturnType (LLVM::LLVMFuncOp mainFunction) |
template<> | |
Error | checkCompatibleReturnType< int32_t > (LLVM::LLVMFuncOp mainFunction) |
template<> | |
Error | checkCompatibleReturnType< int64_t > (LLVM::LLVMFuncOp mainFunction) |
template<> | |
Error | checkCompatibleReturnType< float > (LLVM::LLVMFuncOp mainFunction) |
template<typename Type > | |
Error | compileAndExecuteSingleReturnFunction (Options &options, Operation *module, StringRef entryPoint, CompileAndExecuteConfig config, std::unique_ptr< llvm::TargetMachine > tm) |
#define DEBUG_TYPE "jit-runner" |
Definition at line 45 of file JitRunner.cpp.
Error checkCompatibleReturnType | ( | LLVM::LLVMFuncOp | mainFunction | ) |
References Error.
Error checkCompatibleReturnType< float > | ( | LLVM::LLVMFuncOp | mainFunction | ) |
Definition at line 259 of file JitRunner.cpp.
References Error, and makeStringError().
Error checkCompatibleReturnType< int32_t > | ( | LLVM::LLVMFuncOp | mainFunction | ) |
Definition at line 241 of file JitRunner.cpp.
References Error, and makeStringError().
Error checkCompatibleReturnType< int64_t > | ( | LLVM::LLVMFuncOp | mainFunction | ) |
Definition at line 250 of file JitRunner.cpp.
References Error, and makeStringError().
|
static |
Definition at line 181 of file JitRunner.cpp.
References mlir::config, mlir::ExecutionEngine::create(), mlir::ExecutionEngineOptions::enableObjectDump, getCommandLineOptLevel(), mlir::ExecutionEngineOptions::jitCodeGenOptLevel, mlir::ExecutionEngineOptions::llvmModuleBuilder, options, mlir::ExecutionEngineOptions::sharedLibPaths, and mlir::ExecutionEngineOptions::transformer.
Referenced by compileAndExecuteSingleReturnFunction(), and compileAndExecuteVoidFunction().
Error compileAndExecuteSingleReturnFunction | ( | Options & | options, |
Operation * | module, | ||
StringRef | entryPoint, | ||
CompileAndExecuteConfig | config, | ||
std::unique_ptr< llvm::TargetMachine > | tm | ||
) |
Definition at line 267 of file JitRunner.cpp.
References compileAndExecute(), mlir::config, Error, mlir::SymbolTable::lookupSymbolIn(), makeStringError(), and options.
|
static |
Definition at line 220 of file JitRunner.cpp.
References compileAndExecute(), mlir::config, Error, mlir::SymbolTable::lookupSymbolIn(), makeStringError(), and options.
|
static |
Definition at line 163 of file JitRunner.cpp.
References options.
Referenced by compileAndExecute(), and mlir::JitRunnerMain().
|
inlinestatic |
Definition at line 158 of file JitRunner.cpp.
References Error.
Referenced by checkCompatibleReturnType< float >(), checkCompatibleReturnType< int32_t >(), checkCompatibleReturnType< int64_t >(), compileAndExecuteSingleReturnFunction(), and compileAndExecuteVoidFunction().
|
static |
Definition at line 134 of file JitRunner.cpp.
References mlir::OwningOpRef< OpTy >::get(), mlir::openInputFile(), and mlir::parseSourceFileForTool().