class IRLayer

Declaration

class IRLayer { /* full declaration omitted */ };

Description

Interface for layers that accept LLVM IR.

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

Member Variables

private bool CloneToNewContextOnEmit = false
private llvm::orc::ExecutionSession& ES
private const IRSymbolMapper::ManglingOptions*& MO

Method Overview

  • public IRLayer(llvm::orc::ExecutionSession & ES, const IRSymbolMapper::ManglingOptions *& MO)
  • public virtual llvm::Error add(llvm::orc::ResourceTrackerSP RT, llvm::orc::ThreadSafeModule TSM)
  • public llvm::Error add(llvm::orc::JITDylib & JD, llvm::orc::ThreadSafeModule TSM)
  • public virtual void emit(std::unique_ptr<MaterializationResponsibility> R, llvm::orc::ThreadSafeModule TSM)
  • public bool getCloneToNewContextOnEmit() const
  • public llvm::orc::ExecutionSession & getExecutionSession()
  • public const IRSymbolMapper::ManglingOptions *& getManglingOptions() const
  • public void setCloneToNewContextOnEmit(bool CloneToNewContextOnEmit)
  • public virtual ~IRLayer()

Methods

IRLayer(
    llvm::orc::ExecutionSession& ES,
    const IRSymbolMapper::ManglingOptions*& MO)

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

Parameters

llvm::orc::ExecutionSession& ES
const IRSymbolMapper::ManglingOptions*& MO

virtual llvm::Error add(
    llvm::orc::ResourceTrackerSP RT,
    llvm::orc::ThreadSafeModule TSM)

Description

Add a MaterializatinoUnit representing the given IR to the JITDylib targeted by the given tracker.

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

Parameters

llvm::orc::ResourceTrackerSP RT
llvm::orc::ThreadSafeModule TSM

llvm::Error add(llvm::orc::JITDylib& JD,
                llvm::orc::ThreadSafeModule TSM)

Description

Adds a MaterializationUnit representing the given IR to the given JITDylib. If RT is not specif

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

Parameters

llvm::orc::JITDylib& JD
llvm::orc::ThreadSafeModule TSM

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

Description

Emit should materialize the given IR.

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

Parameters

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

bool getCloneToNewContextOnEmit() const

Description

Returns the current value of the CloneToNewContextOnEmit flag.

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

llvm::orc::ExecutionSession& getExecutionSession()

Description

Returns the ExecutionSession for this layer.

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

const IRSymbolMapper::ManglingOptions*&
getManglingOptions() const

Description

Get the mangling options for this layer.

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

void setCloneToNewContextOnEmit(
    bool CloneToNewContextOnEmit)

Description

Sets the CloneToNewContextOnEmit flag (false by default). When set, IR modules added to this layer will be cloned on to a new context before emit is called. This can be used by clients who want to load all IR using one LLVMContext (to save memory via type and constant uniquing), but want to move Modules to fresh contexts before compiling them to enable concurrent compilation. Single threaded clients, or clients who load every module on a new context, need not set this.

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

Parameters

bool CloneToNewContextOnEmit

virtual ~IRLayer()

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