17#define DEBUG_TYPE "orc"
21namespace rt_bootstrap {
24 assert(Dylibs.empty() &&
"shutdown not called?");
33 const char *PathCStr = Path.empty() ? nullptr : Path.c_str();
40 std::lock_guard<std::mutex> Lock(M);
42 Resolvers.push_back(std::make_unique<DylibSymbolResolver>(
H));
43 Dylibs.insert(
DL.getOSSpecificHandle());
51 std::lock_guard<std::mutex> Lock(M);
69SimpleExecutorDylibManager::openWrapper(
const char *ArgData,
size_t ArgSize) {
71 WrapperFunction<rt::SPSSimpleExecutorDylibManagerOpenSignature>::handle(
79SimpleExecutorDylibManager::resolveWrapper(
const char *ArgData,
84 handle(ArgData, ArgSize,
88 std::promise<TmpResult>
P;
89 auto F =
P.get_future();
92 [&](TmpResult R) {
P.set_value(std::move(R)); });
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Represents an address in the executor process.
static ExecutorAddr fromPtr(T *Ptr, UnwrapFn &&Unwrap=UnwrapFn())
Create an ExecutorAddr from the given pointer.
std::enable_if_t< std::is_pointer< T >::value, T > toPtr(WrapFn &&Wrap=WrapFn()) const
Cast this ExecutorAddr to a pointer of the given type.
Expected< std::vector< std::optional< ExecutorSymbolDef > > > ResolveResult
virtual ~SimpleExecutorDylibManager()
Error shutdown() override
Expected< tpctypes::DylibHandle > open(const std::string &Path, uint64_t Mode)
void addBootstrapSymbols(StringMap< ExecutorAddr > &M) override
static LLVM_ABI DynamicLibrary getPermanentLibrary(const char *filename, std::string *errMsg=nullptr)
This function permanently loads the dynamic library at the given path using the library load operatio...
LLVM_ABI const char * SimpleExecutorDylibManagerResolveWrapperName
LLVM_ABI const char * SimpleExecutorDylibManagerOpenWrapperName
shared::SPSExpected< shared::SPSSequence< shared::SPSOptional< shared::SPSExecutorSymbolDef > > >( shared::SPSExecutorAddr, shared::SPSRemoteSymbolLookupSet) SPSSimpleExecutorDylibManagerResolveSignature
LLVM_ABI const char * SimpleExecutorDylibManagerInstanceName
MethodWrapperHandler< RetT, ClassT, ArgTs... > makeMethodWrapperHandler(RetT(ClassT::*Method)(ArgTs...))
Create a MethodWrapperHandler object from the given method pointer.
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.