17 std::unique_ptr<IRCompiler> Compile)
18 :
IRLayer(ES, ManglingOpts), BaseLayer(BaseLayer),
19 Compile(
std::move(Compile)) {
20 ManglingOpts = &this->Compile->getManglingOptions();
24 std::lock_guard<std::mutex>
Lock(IRLayerMutex);
25 this->NotifyCompiled = std::move(NotifyCompiled);
30 assert(TSM &&
"Module must not be null");
34 std::lock_guard<std::mutex>
Lock(IRLayerMutex);
40 BaseLayer.
emit(std::move(R), std::move(*Obj));
void setNotifyCompiled(NotifyCompiledFunction NotifyCompiled)
This class represents lattice values for constants.
auto withModuleDo(Func &&F) -> decltype(F(std::declval< Module &>()))
Locks the associated ThreadSafeContext and calls the given function on the contained Module...
void emit(MaterializationResponsibility R, ThreadSafeModule TSM) override
Emit should materialize the given IR.
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this layer.
VModuleKey getVModuleKey() const
Returns the VModuleKey for this instance.
An LLVM Module together with a shared ThreadSafeContext.
IRCompileLayer(ExecutionSession &ES, ObjectLayer &BaseLayer, std::unique_ptr< IRCompiler > Compile)
virtual void emit(MaterializationResponsibility R, std::unique_ptr< MemoryBuffer > O)=0
Emit should materialize the given IR.
Interface for layers that accept LLVM IR.
An ExecutionSession represents a running JIT program.
void reportError(Error Err)
Report a error for this execution session.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void failMaterialization()
Notify all not-yet-emitted covered by this MaterializationResponsibility instance that an error has o...
Interface for Layers that accept object files.
std::function< void(VModuleKey K, ThreadSafeModule TSM)> NotifyCompiledFunction