LLVM  10.0.0svn
Classes | Public Member Functions | List of all members
llvm::orc::LazyEmittingLayer< BaseLayerT > Class Template Reference

Lazy-emitting IR layer. More...

#include "llvm/ExecutionEngine/Orc/LazyEmittingLayer.h"

Inheritance diagram for llvm::orc::LazyEmittingLayer< BaseLayerT >:
Inheritance graph
[legend]

Public Member Functions

 LLVM_ATTRIBUTE_DEPRECATED (LazyEmittingLayer(BaseLayerT &BaseLayer), "ORCv1 layers (including LazyEmittingLayer) are deprecated. Please use " "ORCv2, where lazy emission is the default")
 Construct a lazy emitting layer. More...
 
 LazyEmittingLayer (ORCv1DeprecationAcknowledgement, BaseLayerT &BaseLayer)
 Construct a lazy emitting layer. More...
 
Error addModule (VModuleKey K, std::unique_ptr< Module > M)
 Add the given module to the lazy emitting layer. More...
 
Error removeModule (VModuleKey K)
 Remove the module represented by the given handle. More...
 
JITSymbol findSymbol (const std::string &Name, bool ExportedSymbolsOnly)
 Search for the given named symbol. More...
 
JITSymbol findSymbolIn (VModuleKey K, const std::string &Name, bool ExportedSymbolsOnly)
 Get the address of the given symbol in the context of the of compiled modules represented by the key K. More...
 
Error emitAndFinalize (VModuleKey K)
 Immediately emit and finalize the module represented by the given key. More...
 

Detailed Description

template<typename BaseLayerT>
class llvm::orc::LazyEmittingLayer< BaseLayerT >

Lazy-emitting IR layer.

This layer accepts LLVM IR Modules (via addModule) but does not immediately emit them the layer below. Instead, emission to the base layer is deferred until the first time the client requests the address (via JITSymbol::getAddress) for a symbol contained in this layer.

Definition at line 41 of file LazyEmittingLayer.h.

Constructor & Destructor Documentation

◆ LazyEmittingLayer()

template<typename BaseLayerT>
llvm::orc::LazyEmittingLayer< BaseLayerT >::LazyEmittingLayer ( ORCv1DeprecationAcknowledgement  ,
BaseLayerT &  BaseLayer 
)
inline

Construct a lazy emitting layer.

Definition at line 205 of file LazyEmittingLayer.h.

Referenced by llvm::orc::LazyEmittingLayer< CompileLayerT >::emitAndFinalize().

Member Function Documentation

◆ addModule()

template<typename BaseLayerT>
Error llvm::orc::LazyEmittingLayer< BaseLayerT >::addModule ( VModuleKey  K,
std::unique_ptr< Module M 
)
inline

Add the given module to the lazy emitting layer.

Definition at line 209 of file LazyEmittingLayer.h.

◆ emitAndFinalize()

template<typename BaseLayerT>
Error llvm::orc::LazyEmittingLayer< BaseLayerT >::emitAndFinalize ( VModuleKey  K)
inline

Immediately emit and finalize the module represented by the given key.

Definition at line 258 of file LazyEmittingLayer.h.

◆ findSymbol()

template<typename BaseLayerT>
JITSymbol llvm::orc::LazyEmittingLayer< BaseLayerT >::findSymbol ( const std::string &  Name,
bool  ExportedSymbolsOnly 
)
inline

Search for the given named symbol.

Parameters
NameThe name of the symbol to search for.
ExportedSymbolsOnlyIf true, search only for exported symbols.
Returns
A handle for the given named symbol, if it exists.

Definition at line 232 of file LazyEmittingLayer.h.

◆ findSymbolIn()

template<typename BaseLayerT>
JITSymbol llvm::orc::LazyEmittingLayer< BaseLayerT >::findSymbolIn ( VModuleKey  K,
const std::string &  Name,
bool  ExportedSymbolsOnly 
)
inline

Get the address of the given symbol in the context of the of compiled modules represented by the key K.

Definition at line 250 of file LazyEmittingLayer.h.

◆ LLVM_ATTRIBUTE_DEPRECATED()

template<typename BaseLayerT>
llvm::orc::LazyEmittingLayer< BaseLayerT >::LLVM_ATTRIBUTE_DEPRECATED ( LazyEmittingLayer< BaseLayerT >(BaseLayerT &BaseLayer)  ,
"ORCv1 layers (including LazyEmittingLayer< BaseLayerT >) are deprecated. Please use " "  ORCv2,
where lazy emission is the default"   
)

Construct a lazy emitting layer.

◆ removeModule()

template<typename BaseLayerT>
Error llvm::orc::LazyEmittingLayer< BaseLayerT >::removeModule ( VModuleKey  K)
inline

Remove the module represented by the given handle.

This method will free the memory associated with the given module, both in this layer, and the base layer.

Definition at line 220 of file LazyEmittingLayer.h.


The documentation for this class was generated from the following file: