18 std::optional<ExecutorAddr> RegistrationFunctionDylib) {
21 if (!RegistrationFunctionDylib) {
22 if (
auto D = EPC.getDylibMgr().loadDylib(
nullptr))
23 RegistrationFunctionDylib = *
D;
29 EPC.getTargetTriple().isOSBinFormatMachO()
30 ? EPC.intern(
"_llvm_orc_registerJITLoaderGDBWrapper")
31 : EPC.intern(
"llvm_orc_registerJITLoaderGDBWrapper");
34 RegistrationSymbols.
add(RegisterFn);
36 auto Result = EPC.getDylibMgr().lookupSymbols(
37 {{*RegistrationFunctionDylib, RegistrationSymbols}});
41 assert(
Result->size() == 1 &&
"Unexpected number of dylibs in result");
43 "Unexpected number of addresses in result");
45 ExecutorAddr RegisterAddr = (*Result)[0][0].getAddress();
46 return std::make_unique<EPCDebugObjectRegistrar>(ES, RegisterAddr);
50 bool AutoRegisterCode) {
52 RegisterFn, TargetMem, AutoRegisterCode);
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Error registerDebugObject(ExecutorAddrRange TargetMem, bool AutoRegisterCode) override
An ExecutionSession represents a running JIT program.
ExecutorProcessControl & getExecutorProcessControl()
Get the ExecutorProcessControl object associated with this ExecutionSession.
Error callSPSWrapper(ExecutorAddr WrapperFnAddr, WrapperCallArgTs &&...WrapperCallArgs)
Run a wrapper function using SPS to serialize the arguments and deserialize the results.
Represents an address in the executor process.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
SymbolLookupSet & add(SymbolStringPtr Name, SymbolLookupFlags Flags=SymbolLookupFlags::RequiredSymbol)
Add an element to the set.
Pointer to a pooled string representing a symbol name.
Expected< std::unique_ptr< EPCDebugObjectRegistrar > > createJITLoaderGDBRegistrar(ExecutionSession &ES, std::optional< ExecutorAddr > RegistrationFunctionDylib=std::nullopt)
Create a ExecutorProcessControl-based DebugObjectRegistrar that emits debug objects to the GDB JIT in...
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
Represents an address range in the exceutor process.