17 std::unique_ptr<IRCompiler> Compile)
18 :
IRLayer(ES, ManglingOpts), BaseLayer(BaseLayer),
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);
36 NotifyCompiled(*R, std::move(TSM));
40 BaseLayer.
emit(std::move(R), std::move(*Obj));
42 R->failMaterialization();
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
An ExecutionSession represents a running JIT program.
void reportError(Error Err)
Report a error for this execution session.
void emit(std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM) override
Emit should materialize the given IR.
std::function< void(MaterializationResponsibility &R, ThreadSafeModule TSM)> NotifyCompiledFunction
void setNotifyCompiled(NotifyCompiledFunction NotifyCompiled)
IRCompileLayer(ExecutionSession &ES, ObjectLayer &BaseLayer, std::unique_ptr< IRCompiler > Compile)
Interface for layers that accept LLVM IR.
ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this layer.
Interface for Layers that accept object files.
virtual void emit(std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O)=0
Emit should materialize the given IR.
An LLVM Module together with a shared ThreadSafeContext.
decltype(auto) withModuleDo(Func &&F)
Locks the associated ThreadSafeContext and calls the given function on the contained Module.
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.