Go to the documentation of this file.
16 #ifndef LLVM_EXECUTIONENGINE_ORC_LAZYREEXPORTS_H
17 #define LLVM_EXECUTIONENGINE_ORC_LAZYREEXPORTS_H
74 using ReexportsMap = std::map<JITTargetAddress, ReexportsEntry>;
76 using NotifiersMap = std::map<JITTargetAddress, NotifyResolvedFunction>;
82 ReexportsMap Reexports;
83 NotifiersMap Notifiers;
95 template <
typename ORCABI>
Error init() {
99 NotifyLandingResolved) {
105 return TP.takeError();
112 std::unique_ptr<TrampolinePool> TP;
117 template <
typename ORCABI>
120 auto LLCTM = std::unique_ptr<LocalLazyCallThroughManager>(
123 if (
auto Err = LLCTM->init<ORCABI>())
152 void materialize(std::unique_ptr<MaterializationResponsibility> R)
override;
167 inline std::unique_ptr<LazyReexportsMaterializationUnit>
172 return std::make_unique<LazyReexportsMaterializationUnit>(
173 LCTManager, ISManager, SourceJD,
std::move(CallableAliases), SrcJDLoc);
179 #endif // LLVM_EXECUTIONENGINE_ORC_LAZYREEXPORTS_H
This is an optimization pass for GlobalISel generic memory operations.
Represents a JIT'd dynamic library.
SymbolStringPtr SymbolName
unique_function is a type-erasing functor similar to std::function.
Base class for managing collections of named indirect stubs.
Pointer to a pooled string representing a symbol name.
static ErrorSuccess success()
Create a success value.
void setTrampolinePool(TrampolinePool &TP)
Triple - Helper class for working with autoconf configuration names.
A lazy call-through manager that builds trampolines in the current process.
Manages a set of 'lazy call-through' trampolines.
std::unique_ptr< LazyReexportsMaterializationUnit > lazyReexports(LazyCallThroughManager &LCTManager, IndirectStubsManager &ISManager, JITDylib &SourceJD, SymbolAliasMap CallableAliases, ImplSymbolMap *SrcJDLoc=nullptr)
Define lazy-reexports based on the given SymbolAliasMap.
Tagged union holding either a T or a Error.
LazyReexportsMaterializationUnit(LazyCallThroughManager &LCTManager, IndirectStubsManager &ISManager, JITDylib &SourceJD, SymbolAliasMap CallableAliases, ImplSymbolMap *SrcJDLoc)
A MaterializationUnit represents a set of symbol definitions that can be materialized as a group,...
virtual ~LazyCallThroughManager()=default
static Expected< std::unique_ptr< LocalLazyCallThroughManager > > Create(ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr)
Create a LocalLazyCallThroughManager using the given ABI.
Expected< ReexportsEntry > findReexport(JITTargetAddress TrampolineAddr)
Base class for pools of compiler re-entry trampolines.
StringRef getName() const override
Return the name of this materialization unit.
Expected< JITTargetAddress > getCallThroughTrampoline(JITDylib &SourceJD, SymbolStringPtr SymbolName, NotifyResolvedFunction NotifyResolved)
JITTargetAddress reportCallThroughError(Error Err)
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
StringRef - Represent a constant reference to a string, i.e.
Expected< std::unique_ptr< LazyCallThroughManager > > createLocalLazyCallThroughManager(const Triple &T, ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr)
Create a LocalLazyCallThroughManager from the given triple and execution session.
A materialization unit that builds lazy re-exports.
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
Error notifyResolved(JITTargetAddress TrampolineAddr, JITTargetAddress ResolvedAddr)
Lightweight error class with error context and mandatory checking.
An ExecutionSession represents a running JIT program.
uint64_t JITTargetAddress
Represents an address in the target process's address space.
LazyCallThroughManager(ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr, TrampolinePool *TP)
static Expected< std::unique_ptr< LocalTrampolinePool > > Create(ResolveLandingFunction ResolveLanding)
Creates a LocalTrampolinePool with the given RunCallback function.
unique_function< void(JITTargetAddress) const > NotifyLandingResolvedFunction
void resolveTrampolineLandingAddress(JITTargetAddress TrampolineAddr, TrampolinePool::NotifyLandingResolvedFunction NotifyLandingResolved)