14#ifndef LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H
15#define LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H
61 std::function<std::unique_ptr<IndirectStubsManager>()>;
67 std::function<std::optional<GlobalValueSet>(
GlobalValueSet Requested)>;
71 static std::optional<GlobalValueSet>
76 static std::optional<GlobalValueSet>
92 void emit(std::unique_ptr<MaterializationResponsibility> R,
96 struct PerDylibResources {
99 std::unique_ptr<IndirectStubsManager> ISMgr)
100 : ImplD(ImplD), ISMgr(
std::
move(ISMgr)) {}
101 JITDylib &getImplDylib() {
return ImplD; }
102 IndirectStubsManager &getISManager() {
return *ISMgr; }
106 std::unique_ptr<IndirectStubsManager> ISMgr;
109 using PerDylibResourcesMap = std::map<const JITDylib *, PerDylibResources>;
111 PerDylibResources &getPerDylibResources(JITDylib &TargetD);
113 void cleanUpModule(Module &M);
117 void emitPartition(std::unique_ptr<MaterializationResponsibility> R,
118 ThreadSafeModule TSM,
121 mutable std::mutex CODLayerMutex;
124 LazyCallThroughManager &LCTMgr;
126 PerDylibResourcesMap DylibResources;
128 SymbolLinkagePromoter PromoteSymbols;
129 ImplSymbolMap *AliaseeImpls =
nullptr;
This file implements a class to represent arbitrary precision integral constant values and operations...
This file contains the simple types necessary to represent the attributes associated with functions a...
This file contains the declarations for the subclasses of Constant, which represent the different fla...
Module.h This file contains the declarations for the Module class.
std::function< std::unique_ptr< IndirectStubsManager >()> IndirectStubsManagerBuilder
Builder for IndirectStubsManagers.
static std::optional< GlobalValueSet > compileWholeModule(GlobalValueSet Requested)
Off-the-shelf partitioning which compiles whole modules whenever any symbol in them is requested.
void emit(std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM) override
Emits the given module.
std::set< const GlobalValue * > GlobalValueSet
void setImplMap(ImplSymbolMap *Imp)
Sets the ImplSymbolMap.
static std::optional< GlobalValueSet > compileRequested(GlobalValueSet Requested)
Off-the-shelf partitioning which compiles all requested symbols (usually a single function at a time)...
std::function< std::optional< GlobalValueSet >(GlobalValueSet Requested)> PartitionFunction
Partitioning function.
void setPartitionFunction(PartitionFunction Partition)
Sets the partition function.
An ExecutionSession represents a running JIT program.
Interface for layers that accept LLVM IR.
IRLayer(ExecutionSession &ES, const IRSymbolMapper::ManglingOptions *&MO)
std::map< SymbolStringPtr, GlobalValue * > SymbolNameToDefinitionMap
Represents a JIT'd dynamic library.
Manages a set of 'lazy call-through' trampolines.
An LLVM Module together with a shared ThreadSafeContext.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.