LLVM 20.0.0git
|
Interface for layers that accept LLVM IR. More...
#include "llvm/ExecutionEngine/Orc/Layer.h"
Public Member Functions | |
IRLayer (ExecutionSession &ES, const IRSymbolMapper::ManglingOptions *&MO) | |
virtual | ~IRLayer () |
ExecutionSession & | getExecutionSession () |
Returns the ExecutionSession for this layer. | |
const IRSymbolMapper::ManglingOptions *& | getManglingOptions () const |
Get the mangling options for this layer. | |
void | setCloneToNewContextOnEmit (bool CloneToNewContextOnEmit) |
Sets the CloneToNewContextOnEmit flag (false by default). | |
bool | getCloneToNewContextOnEmit () const |
Returns the current value of the CloneToNewContextOnEmit flag. | |
virtual Error | add (ResourceTrackerSP RT, ThreadSafeModule TSM) |
Add a MaterializatinoUnit representing the given IR to the JITDylib targeted by the given tracker. | |
Error | add (JITDylib &JD, ThreadSafeModule TSM) |
Adds a MaterializationUnit representing the given IR to the given JITDylib. | |
virtual void | emit (std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM)=0 |
Emit should materialize the given IR. | |
|
inline |
|
virtualdefault |
|
inline |
Adds a MaterializationUnit representing the given IR to the given JITDylib.
If RT is not specif
Definition at line 104 of file Layer.h.
References add(), and llvm::orc::JITDylib::getDefaultResourceTracker().
|
virtual |
|
pure virtual |
Emit should materialize the given IR.
Implemented in llvm::orc::CompileOnDemandLayer, llvm::orc::IRCompileLayer, llvm::orc::IRPartitionLayer, llvm::orc::IRTransformLayer, llvm::orc::ReOptimizeLayer, and llvm::orc::IRSpeculationLayer.
Referenced by llvm::orc::IRTransformLayer::emit(), llvm::orc::ReOptimizeLayer::emit(), and llvm::orc::IRSpeculationLayer::emit().
|
inline |
|
inline |
Returns the ExecutionSession for this layer.
Definition at line 75 of file Layer.h.
Referenced by llvm::orc::CompileOnDemandLayer::emit(), llvm::orc::IRCompileLayer::emit(), llvm::orc::IRPartitionLayer::emit(), and llvm::orc::IRTransformLayer::emit().
|
inline |
Get the mangling options for this layer.
Definition at line 78 of file Layer.h.
Referenced by add(), llvm::orc::CompileOnDemandLayer::emit(), and llvm::orc::IRPartitionLayer::emit().
|
inline |
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.