21 std::optional<ExecutorAddr> RegistrationFunctionDylib) {
24 if (!RegistrationFunctionDylib) {
25 if (
auto D = EPC.loadDylib(
nullptr))
26 RegistrationFunctionDylib = *
D;
32 EPC.getTargetTriple().isOSBinFormatMachO()
33 ? EPC.intern(
"_llvm_orc_registerJITLoaderGDBWrapper")
34 : EPC.intern(
"llvm_orc_registerJITLoaderGDBWrapper");
37 RegistrationSymbols.
add(RegisterFn);
40 EPC.lookupSymbols({{*RegistrationFunctionDylib, RegistrationSymbols}});
44 assert(
Result->size() == 1 &&
"Unexpected number of dylibs in result");
46 "Unexpected number of addresses in result");
48 ExecutorAddr RegisterAddr = (*Result)[0][0].getAddress();
49 return std::make_unique<EPCDebugObjectRegistrar>(ES, RegisterAddr);
53 bool AutoRegisterCode) {
55 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.