class IRMaterializationUnit

Declaration

class IRMaterializationUnit : public MaterializationUnit { /* full declaration omitted */ };

Description

IRMaterializationUnit is a convenient base class for MaterializationUnits wrapping LLVM IR. Represents materialization responsibility for all symbols in the given module. If symbols are overridden by other definitions, then their linkage is changed to available-externally.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Layer.h:31

Inherits from: MaterializationUnit

Member Variables

protected llvm::orc::ThreadSafeModule TSM
protected llvm::orc::IRMaterializationUnit:: SymbolNameToDefinitionMap SymbolToDefinition

Inherited from MaterializationUnit:

protected SymbolFlags
protected InitSymbol
public static ID

Method Overview

  • public IRMaterializationUnit(llvm::orc::ExecutionSession & ES, const IRSymbolMapper::ManglingOptions & MO, llvm::orc::ThreadSafeModule TSM)
  • public IRMaterializationUnit(llvm::orc::ThreadSafeModule TSM, llvm::orc::MaterializationUnit::Interface I, llvm::orc::IRMaterializationUnit::SymbolNameToDefinitionMap SymbolToDefinition)
  • private void discard(const llvm::orc::JITDylib & JD, const llvm::orc::SymbolStringPtr & Name)
  • private static llvm::orc::SymbolStringPtr getInitSymbol(llvm::orc::ExecutionSession & ES, const llvm::orc::ThreadSafeModule & TSM)
  • public const llvm::orc::ThreadSafeModule & getModule() const
  • public llvm::StringRef getName() const

Inherited from MaterializationUnit:

Methods

IRMaterializationUnit(
    llvm::orc::ExecutionSession& ES,
    const IRSymbolMapper::ManglingOptions& MO,
    llvm::orc::ThreadSafeModule TSM)

Description

Create an IRMaterializationLayer. Scans the module to build the SymbolFlags and SymbolToDefinition maps.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Layer.h:37

Parameters

llvm::orc::ExecutionSession& ES
const IRSymbolMapper::ManglingOptions& MO
llvm::orc::ThreadSafeModule TSM

IRMaterializationUnit(
    llvm::orc::ThreadSafeModule TSM,
    llvm::orc::MaterializationUnit::Interface I,
    llvm::orc::IRMaterializationUnit::
        SymbolNameToDefinitionMap
            SymbolToDefinition)

Description

Create an IRMaterializationLayer from a module, and pre-existing SymbolFlags and SymbolToDefinition maps. The maps must provide entries for each definition in M. This constructor is useful for delegating work from one IRMaterializationUnit to another.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Layer.h:46

Parameters

llvm::orc::ThreadSafeModule TSM
llvm::orc::MaterializationUnit::Interface I
llvm::orc::IRMaterializationUnit:: SymbolNameToDefinitionMap SymbolToDefinition

void discard(
    const llvm::orc::JITDylib& JD,
    const llvm::orc::SymbolStringPtr& Name)

Description

Implementations of this method should discard the given symbol from the source (e.g. if the source is an LLVM IR Module and the symbol is a function, delete the function body or mark it available externally).

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Layer.h:63

Parameters

const llvm::orc::JITDylib& JD
const llvm::orc::SymbolStringPtr& Name

static llvm::orc::SymbolStringPtr getInitSymbol(
    llvm::orc::ExecutionSession& ES,
    const llvm::orc::ThreadSafeModule& TSM)

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Layer.h:60

Parameters

llvm::orc::ExecutionSession& ES
const llvm::orc::ThreadSafeModule& TSM

const llvm::orc::ThreadSafeModule& getModule()
    const

Description

Return a reference to the contained ThreadSafeModule.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Layer.h:53

llvm::StringRef getName() const

Description

Return the ModuleIdentifier as the name for this MaterializationUnit.

Declared at: llvm/include/llvm/ExecutionEngine/Orc/Layer.h:50