MLIR  16.0.0git
Functions
JitRunner.cpp File Reference
#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 "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/FileUtilities.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/ToolOutputFile.h"
#include <cstdint>
#include <numeric>
#include <utility>
+ Include dependency graph for JitRunner.cpp:

Go to the source code of this file.

Functions

static OwningOpRef< ModuleOp > parseMLIRInput (StringRef inputFilename, MLIRContext *context)
 
static Error makeStringError (const Twine &message)
 
static Optional< unsignedgetCommandLineOptLevel (Options &options)
 
static Error compileAndExecute (Options &options, ModuleOp module, StringRef entryPoint, CompileAndExecuteConfig config, void **args)
 
static Error compileAndExecuteVoidFunction (Options &options, ModuleOp module, StringRef entryPoint, CompileAndExecuteConfig config)
 
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, ModuleOp module, StringRef entryPoint, CompileAndExecuteConfig config)
 

Function Documentation

◆ checkCompatibleReturnType()

template<typename Type >
Error checkCompatibleReturnType ( LLVM::LLVMFuncOp  mainFunction)

◆ checkCompatibleReturnType< float >()

template<>
Error checkCompatibleReturnType< float > ( LLVM::LLVMFuncOp  mainFunction)

Definition at line 277 of file JitRunner.cpp.

References makeStringError(), and mlir::success().

◆ checkCompatibleReturnType< int32_t >()

template<>
Error checkCompatibleReturnType< int32_t > ( LLVM::LLVMFuncOp  mainFunction)

Definition at line 257 of file JitRunner.cpp.

References makeStringError(), and mlir::success().

◆ checkCompatibleReturnType< int64_t >()

template<>
Error checkCompatibleReturnType< int64_t > ( LLVM::LLVMFuncOp  mainFunction)

Definition at line 267 of file JitRunner.cpp.

References makeStringError(), and mlir::success().

◆ compileAndExecute()

static Error compileAndExecute ( Options &  options,
ModuleOp  module,
StringRef  entryPoint,
CompileAndExecuteConfig  config,
void **  args 
)
static

◆ compileAndExecuteSingleReturnFunction()

template<typename Type >
Error compileAndExecuteSingleReturnFunction ( Options &  options,
ModuleOp  module,
StringRef  entryPoint,
CompileAndExecuteConfig  config 
)

Definition at line 286 of file JitRunner.cpp.

References mlir::Error, and makeStringError().

◆ compileAndExecuteVoidFunction()

static Error compileAndExecuteVoidFunction ( Options &  options,
ModuleOp  module,
StringRef  entryPoint,
CompileAndExecuteConfig  config 
)
static

◆ getCommandLineOptLevel()

static Optional<unsigned> getCommandLineOptLevel ( Options &  options)
static

Definition at line 134 of file JitRunner.cpp.

Referenced by compileAndExecute(), and mlir::JitRunnerMain().

◆ makeStringError()

static Error makeStringError ( const Twine &  message)
inlinestatic

◆ parseMLIRInput()

static OwningOpRef<ModuleOp> parseMLIRInput ( StringRef  inputFilename,
MLIRContext context 
)
static

Definition at line 114 of file JitRunner.cpp.

References mlir::openInputFile().

Referenced by mlir::JitRunnerMain().