class CompileOnDemandLayer

Declaration

class CompileOnDemandLayer : public IRLayer { /* full declaration omitted */ };

Description

Interface for layers that accept LLVM IR.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:56

Inherits from: IRLayer

Member Variables

private std::mutex CODLayerMutex
private llvm::orc::IRLayer& BaseLayer
private llvm::orc::LazyCallThroughManager& LCTMgr
private llvm::orc::CompileOnDemandLayer:: IndirectStubsManagerBuilder BuildIndirectStubsManager
private llvm::orc::CompileOnDemandLayer:: PerDylibResourcesMap DylibResources
private llvm::orc::CompileOnDemandLayer::PartitionFunction Partition = compileRequested
private llvm::orc::SymbolLinkagePromoter PromoteSymbols
private llvm::orc::ImplSymbolMap* AliaseeImpls = nullptr

Method Overview

  • public CompileOnDemandLayer(llvm::orc::ExecutionSession & ES, llvm::orc::IRLayer & BaseLayer, llvm::orc::LazyCallThroughManager & LCTMgr, llvm::orc::CompileOnDemandLayer::IndirectStubsManagerBuilder BuildIndirectStubsManager)
  • private void cleanUpModule(llvm::Module & M)
  • public static Optional<llvm::orc::CompileOnDemandLayer::GlobalValueSet> compileRequested(llvm::orc::CompileOnDemandLayer::GlobalValueSet Requested)
  • public static Optional<llvm::orc::CompileOnDemandLayer::GlobalValueSet> compileWholeModule(llvm::orc::CompileOnDemandLayer::GlobalValueSet Requested)
  • public void emit(std::unique_ptr<MaterializationResponsibility> R, llvm::orc::ThreadSafeModule TSM)
  • private void emitPartition(std::unique_ptr<MaterializationResponsibility> R, llvm::orc::ThreadSafeModule TSM, IRMaterializationUnit::SymbolNameToDefinitionMap Defs)
  • private void expandPartition(llvm::orc::CompileOnDemandLayer::GlobalValueSet & Partition)
  • private llvm::orc::CompileOnDemandLayer::PerDylibResources & getPerDylibResources(llvm::orc::JITDylib & TargetD)
  • public void setImplMap(llvm::orc::ImplSymbolMap * Imp)
  • public void setPartitionFunction(llvm::orc::CompileOnDemandLayer::PartitionFunction Partition)

Inherited from IRLayer:

Methods

CompileOnDemandLayer(
    llvm::orc::ExecutionSession& ES,
    llvm::orc::IRLayer& BaseLayer,
    llvm::orc::LazyCallThroughManager& LCTMgr,
    llvm::orc::CompileOnDemandLayer::
        IndirectStubsManagerBuilder
            BuildIndirectStubsManager)

Description

Construct a CompileOnDemandLayer.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:79

Parameters

llvm::orc::ExecutionSession& ES
llvm::orc::IRLayer& BaseLayer
llvm::orc::LazyCallThroughManager& LCTMgr
llvm::orc::CompileOnDemandLayer:: IndirectStubsManagerBuilder BuildIndirectStubsManager

void cleanUpModule(llvm::Module& M)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:112

Parameters

llvm::Module& M

static Optional<llvm::orc::CompileOnDemandLayer::
                    GlobalValueSet>
compileRequested(llvm::orc::CompileOnDemandLayer::
                     GlobalValueSet Requested)

Description

Off-the-shelf partitioning which compiles all requested symbols (usually a single function at a time).

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:72

Parameters

llvm::orc::CompileOnDemandLayer::GlobalValueSet Requested

static Optional<llvm::orc::CompileOnDemandLayer::
                    GlobalValueSet>
compileWholeModule(
    llvm::orc::CompileOnDemandLayer::
        GlobalValueSet Requested)

Description

Off-the-shelf partitioning which compiles whole modules whenever any symbol in them is requested.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:76

Parameters

llvm::orc::CompileOnDemandLayer::GlobalValueSet Requested

void emit(std::unique_ptr<
              MaterializationResponsibility> R,
          llvm::orc::ThreadSafeModule TSM)

Description

Emits the given module. This should not be called by clients: it will be called by the JIT when a definition added via the add method is requested.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:91

Parameters

std::unique_ptr<MaterializationResponsibility> R
llvm::orc::ThreadSafeModule TSM

void emitPartition(
    std::unique_ptr<MaterializationResponsibility>
        R,
    llvm::orc::ThreadSafeModule TSM,
    IRMaterializationUnit::
        SymbolNameToDefinitionMap Defs)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:116

Parameters

std::unique_ptr<MaterializationResponsibility> R
llvm::orc::ThreadSafeModule TSM
IRMaterializationUnit::SymbolNameToDefinitionMap Defs

void expandPartition(
    llvm::orc::CompileOnDemandLayer::
        GlobalValueSet& Partition)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:114

Parameters

llvm::orc::CompileOnDemandLayer::GlobalValueSet& Partition

llvm::orc::CompileOnDemandLayer::
    PerDylibResources&
    getPerDylibResources(
        llvm::orc::JITDylib& TargetD)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:110

Parameters

llvm::orc::JITDylib& TargetD

void setImplMap(llvm::orc::ImplSymbolMap* Imp)

Description

Sets the ImplSymbolMap

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:87

Parameters

llvm::orc::ImplSymbolMap* Imp

void setPartitionFunction(
    llvm::orc::CompileOnDemandLayer::
        PartitionFunction Partition)

Description

Sets the partition function.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h:84

Parameters

llvm::orc::CompileOnDemandLayer::PartitionFunction Partition