14 #ifndef LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H 15 #define LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H 60 class ExtractingIRMaterializationUnit;
68 std::function<std::unique_ptr<IndirectStubsManager>()>;
97 void emit(std::unique_ptr<MaterializationResponsibility>
R,
101 struct PerDylibResources {
104 std::unique_ptr<IndirectStubsManager> ISMgr)
105 : ImplD(ImplD), ISMgr(
std::
move(ISMgr)) {}
106 JITDylib &getImplDylib() {
return ImplD; }
107 IndirectStubsManager &getISManager() {
return *ISMgr; }
111 std::unique_ptr<IndirectStubsManager> ISMgr;
114 using PerDylibResourcesMap = std::map<const JITDylib *, PerDylibResources>;
116 PerDylibResources &getPerDylibResources(JITDylib &TargetD);
118 void cleanUpModule(
Module &M);
122 void emitPartition(std::unique_ptr<MaterializationResponsibility> R,
123 ThreadSafeModule TSM,
126 mutable std::mutex CODLayerMutex;
129 LazyCallThroughManager &LCTMgr;
131 PerDylibResourcesMap DylibResources;
133 SymbolLinkagePromoter PromoteSymbols;
134 ImplSymbolMap *AliaseeImpls =
nullptr;
140 #endif // LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H
This class represents lattice values for constants.
static Optional< GlobalValueSet > compileRequested(GlobalValueSet Requested)
Off-the-shelf partitioning which compiles all requested symbols (usually a single function at a time)...
std::function< std::unique_ptr< IndirectStubsManager >()> IndirectStubsManagerBuilder
Builder for IndirectStubsManagers.
std::function< Optional< GlobalValueSet >(GlobalValueSet Requested)> PartitionFunction
Partitioning function.
This file contains the simple types necessary to represent the attributes associated with functions a...
std::map< SymbolStringPtr, GlobalValue * > SymbolNameToDefinitionMap
This file implements a class to represent arbitrary precision integral constant values and operations...
IRLayer(ExecutionSession &ES, const IRSymbolMapper::ManglingOptions *&MO)
This file contains the declarations for the subclasses of Constant, which represent the different fla...
An LLVM Module together with a shared ThreadSafeContext.
void setImplMap(ImplSymbolMap *Imp)
Sets the ImplSymbolMap.
Interface for layers that accept LLVM IR.
Machine Check Debug Module
Module.h This file contains the declarations for the Module class.
static Optional< GlobalValueSet > compileWholeModule(GlobalValueSet Requested)
Off-the-shelf partitioning which compiles whole modules whenever any symbol in them is requested.
An ExecutionSession represents a running JIT program.
CompileOnDemandLayer(ExecutionSession &ES, IRLayer &BaseLayer, LazyCallThroughManager &LCTMgr, IndirectStubsManagerBuilder BuildIndirectStubsManager)
Construct a CompileOnDemandLayer.
void setPartitionFunction(PartitionFunction Partition)
Sets the partition function.
Manages a set of 'lazy call-through' trampolines.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
std::set< const GlobalValue * > GlobalValueSet
A symbol table that supports asynchoronous symbol queries.
void emit(std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM) override
Emits the given module.