17 :
IRLayer(ES), BaseLayer(BaseLayer), Compile(
std::move(Compile)) {}
20 std::lock_guard<std::mutex>
Lock(IRLayerMutex);
21 this->NotifyCompiled = std::move(NotifyCompiled);
25 std::unique_ptr<Module> M) {
26 assert(M &&
"Module must not be null");
28 if (
auto Obj = Compile(*M)) {
30 std::lock_guard<std::mutex>
Lock(IRLayerMutex);
32 NotifyCompiled(K, std::move(M));
36 BaseLayer.
emit(std::move(R), std::move(K), std::move(*Obj));
Compute iterated dominance frontiers using a linear time algorithm.
uint64_t VModuleKey
VModuleKey provides a unique identifier (allocated and managed by ExecutionSessions) for a module add...
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this layer.
void reportError(Error Err)
Report a error for this execution session.
Interface for layers that accept LLVM IR.
std::function< Expected< std::unique_ptr< MemoryBuffer > >(Module &)> CompileFunction
void emit(MaterializationResponsibility R, VModuleKey K, std::unique_ptr< Module > M) override
Emit should materialize the given IR.
void setNotifyCompiled(NotifyCompiledFunction NotifyCompiled)
virtual void emit(MaterializationResponsibility R, VModuleKey K, std::unique_ptr< MemoryBuffer > O)=0
Emit should materialize the given IR.
An ExecutionSession represents a running JIT program.
IRCompileLayer2(ExecutionSession &ES, ObjectLayer &BaseLayer, CompileFunction Compile)
std::function< void(VModuleKey K, std::unique_ptr< Module >)> NotifyCompiledFunction
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void failMaterialization()
Notify all unfinalized symbols that an error has occurred.
Interface for Layers that accept object files.