Go to the documentation of this file.
14 #define DEBUG_TYPE "orc"
18 namespace rt_bootstrap {
27 return make_error<StringError>(
"open: non-zero mode bits not yet supported",
30 const char *PathCStr = Path.empty() ? nullptr : Path.c_str();
37 std::lock_guard<std::mutex>
Lock(M);
45 std::vector<ExecutorAddr> Result;
47 std::lock_guard<std::mutex>
Lock(M);
49 if (
I == Dylibs.
end())
50 return make_error<StringError>(
"No dylib for handle " +
formatv(
"{0:x}",
H),
54 for (
const auto &
E : L) {
58 return make_error<StringError>(
"Required address for empty symbol \"\"",
64 const char *DemangledSymName =
E.Name.c_str();
66 if (
E.Name.front() !=
'_')
67 return make_error<StringError>(
Twine(
"MachO symbol \"") +
E.Name +
68 "\" missing leading '_'",
73 void *
Addr =
DL.getAddressOfSymbol(DemangledSymName);
74 if (!
Addr &&
E.Required)
75 return make_error<StringError>(
Twine(
"Missing definition for ") +
90 std::lock_guard<std::mutex>
Lock(M);
108 SimpleExecutorDylibManager::openWrapper(
const char *ArgData,
size_t ArgSize) {
118 SimpleExecutorDylibManager::lookupWrapper(
const char *ArgData,
size_t ArgSize) {
Represents an address in the executor process.
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
static RegisterPass< DebugifyModulePass > DM("debugify", "Attach debug info to everything")
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
then ret i32 result Tail recursion elimination should handle
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
const char * SimpleExecutorDylibManagerLookupWrapperName
static DynamicLibrary getPermanentLibrary(const char *filename, std::string *errMsg=nullptr)
This function permanently loads the dynamic library at the given path.
const char * SimpleExecutorDylibManagerInstanceName
static ExecutorAddr fromPtr(T *Value)
Create an ExecutorAddr from the given pointer.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Expected< tpctypes::DylibHandle > open(const std::string &Path, uint64_t Mode)
iterator find(const_arg_type_t< KeyT > Val)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
Error shutdown() override
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Expected< std::vector< ExecutorAddr > > lookup(tpctypes::DylibHandle H, const RemoteSymbolLookupSet &L)
LLVM_NODISCARD bool empty() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
virtual ~SimpleExecutorDylibManager()
Lightweight error class with error context and mandatory checking.
void addBootstrapSymbols(StringMap< ExecutorAddr > &M) override
MethodWrapperHandler< RetT, ClassT, ArgTs... > makeMethodWrapperHandler(RetT(ClassT::*Method)(ArgTs...))
Create a MethodWrapperHandler object from the given method pointer.
const char * SimpleExecutorDylibManagerOpenWrapperName