llvm/mlir/lib/ExecutionEngine/ExecutionEngine.cpp

//===- ExecutionEngine.cpp - MLIR Execution engine and utils --------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements the execution engine for MLIR modules based on LLVM Orc
// JIT engine.
//
//===----------------------------------------------------------------------===//
#include "mlir/ExecutionEngine/ExecutionEngine.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Target/LLVMIR/Export.h"

#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/ExecutionEngine/ObjectCache.h"
#include "llvm/ExecutionEngine/Orc/CompileUtils.h"
#include "llvm/ExecutionEngine/Orc/ExecutionUtils.h"
#include "llvm/ExecutionEngine/Orc/IRCompileLayer.h"
#include "llvm/ExecutionEngine/Orc/IRTransformLayer.h"
#include "llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h"
#include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/SubtargetFeature.h"

#define DEBUG_TYPE

usingnamespacemlir;
dbgs;
Error;
errs;
Expected;
LLVMContext;
MemoryBuffer;
MemoryBufferRef;
Module;
SectionMemoryManager;
StringError;
Triple;
DynamicLibrarySearchGenerator;
ExecutionSession;
IRCompileLayer;
JITTargetMachineBuilder;
MangleAndInterner;
RTDyldObjectLinkingLayer;
SymbolMap;
ThreadSafeModule;
TMOwningSimpleCompiler;

/// Wrap a string into an llvm::StringError.
static Error makeStringError(const Twine &message) {}

void SimpleObjectCache::notifyObjectCompiled(const Module *m,
                                             MemoryBufferRef objBuffer) {}

std::unique_ptr<MemoryBuffer> SimpleObjectCache::getObject(const Module *m) {}

void SimpleObjectCache::dumpToObjectFile(StringRef outputFilename) {}

bool SimpleObjectCache::isEmpty() {}

void ExecutionEngine::dumpToObjectFile(StringRef filename) {}

void ExecutionEngine::registerSymbols(
    llvm::function_ref<SymbolMap(MangleAndInterner)> symbolMap) {}

void ExecutionEngine::setupTargetTripleAndDataLayout(Module *llvmModule,
                                                     llvm::TargetMachine *tm) {}

static std::string makePackedFunctionName(StringRef name) {}

// For each function in the LLVM module, define an interface function that wraps
// all the arguments of the original function and all its results into an i8**
// pointer to provide a unified invocation interface.
static void packFunctionArguments(Module *module) {}

ExecutionEngine::ExecutionEngine(bool enableObjectDump,
                                 bool enableGDBNotificationListener,
                                 bool enablePerfNotificationListener)
    :{}

ExecutionEngine::~ExecutionEngine() {}

Expected<std::unique_ptr<ExecutionEngine>>
ExecutionEngine::create(Operation *m, const ExecutionEngineOptions &options,
                        std::unique_ptr<llvm::TargetMachine> tm) {}

Expected<void (*)(void **)>
ExecutionEngine::lookupPacked(StringRef name) const {}

Expected<void *> ExecutionEngine::lookup(StringRef name) const {}

Error ExecutionEngine::invokePacked(StringRef name,
                                    MutableArrayRef<void *> args) {}