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);
42 R->failMaterialization();
void setNotifyCompiled(NotifyCompiledFunction NotifyCompiled)
This class represents lattice values for constants.
virtual void emit(std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O)=0
Emit should materialize the given IR.
ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this layer.
void emit(std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM) override
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.
IRCompileLayer(ExecutionSession &ES, ObjectLayer &BaseLayer, std::unique_ptr< IRCompiler > Compile)
Interface for layers that accept LLVM IR.
An ExecutionSession represents a running JIT program.
std::function< void(MaterializationResponsibility &R, ThreadSafeModule TSM)> NotifyCompiledFunction
void reportError(Error Err)
Report a error for this execution session.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Interface for Layers that accept object files.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.