14#ifndef LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H
15#define LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H
62 std::function<std::unique_ptr<IndirectStubsManager>()>;
68 std::function<std::optional<GlobalValueSet>(
GlobalValueSet Requested)>;
72 static std::optional<GlobalValueSet>
77 static std::optional<GlobalValueSet>
93 void emit(std::unique_ptr<MaterializationResponsibility> R,
97 struct PerDylibResources {
100 std::unique_ptr<IndirectStubsManager> ISMgr)
101 : ImplD(ImplD), ISMgr(
std::
move(ISMgr)) {}
102 JITDylib &getImplDylib() {
return ImplD; }
103 IndirectStubsManager &getISManager() {
return *ISMgr; }
107 std::unique_ptr<IndirectStubsManager> ISMgr;
110 using PerDylibResourcesMap = std::map<const JITDylib *, PerDylibResources>;
112 PerDylibResources &getPerDylibResources(JITDylib &TargetD);
114 void cleanUpModule(Module &M);
118 void emitPartition(std::unique_ptr<MaterializationResponsibility> R,
119 ThreadSafeModule TSM,
122 mutable std::mutex CODLayerMutex;
125 LazyCallThroughManager &LCTMgr;
127 PerDylibResourcesMap DylibResources;
129 SymbolLinkagePromoter PromoteSymbols;
130 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.
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.