#include "llvm/ExecutionEngine/Orc/IndirectionUtils.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ExecutionEngine/JITLink/x86_64.h"
#include "llvm/ExecutionEngine/Orc/OrcABISupport.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCInstrAnalysis.h"
#include "llvm/Support/Format.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include <sstream>
#define DEBUG_TYPE …
usingnamespacellvm;
usingnamespacellvm::orc;
namespace {
class CompileCallbackMaterializationUnit : public orc::MaterializationUnit { … };
}
namespace llvm {
namespace orc {
TrampolinePool::~TrampolinePool() = default;
void IndirectStubsManager::anchor() { … }
Expected<ExecutorAddr>
JITCompileCallbackManager::getCompileCallback(CompileFunction Compile) { … }
ExecutorAddr
JITCompileCallbackManager::executeCompileCallback(ExecutorAddr TrampolineAddr) { … }
Expected<std::unique_ptr<JITCompileCallbackManager>>
createLocalCompileCallbackManager(const Triple &T, ExecutionSession &ES,
ExecutorAddr ErrorHandlerAddress) { … }
std::function<std::unique_ptr<IndirectStubsManager>()>
createLocalIndirectStubsManagerBuilder(const Triple &T) { … }
Constant* createIRTypedAddress(FunctionType &FT, ExecutorAddr Addr) { … }
GlobalVariable* createImplPointer(PointerType &PT, Module &M,
const Twine &Name, Constant *Initializer) { … }
void makeStub(Function &F, Value &ImplPointer) { … }
std::vector<GlobalValue *> SymbolLinkagePromoter::operator()(Module &M) { … }
Function* cloneFunctionDecl(Module &Dst, const Function &F,
ValueToValueMapTy *VMap) { … }
GlobalVariable* cloneGlobalVariableDecl(Module &Dst, const GlobalVariable &GV,
ValueToValueMapTy *VMap) { … }
GlobalAlias* cloneGlobalAliasDecl(Module &Dst, const GlobalAlias &OrigA,
ValueToValueMapTy &VMap) { … }
Error addFunctionPointerRelocationsToCurrentSymbol(jitlink::Symbol &Sym,
jitlink::LinkGraph &G,
MCDisassembler &Disassembler,
MCInstrAnalysis &MIA) { … }
}
}