LLVM
8.0.1
|
#include "llvm/ExecutionEngine/Orc/IRTransformLayer.h"
Public Types | |
using | TransformFunction = std::function< Expected< ThreadSafeModule >(ThreadSafeModule, const MaterializationResponsibility &R)> |
Public Member Functions | |
IRTransformLayer (ExecutionSession &ES, IRLayer &BaseLayer, TransformFunction Transform=identityTransform) | |
void | setTransform (TransformFunction Transform) |
void | emit (MaterializationResponsibility R, ThreadSafeModule TSM) override |
Emit should materialize the given IR. More... | |
Public Member Functions inherited from llvm::orc::IRLayer | |
IRLayer (ExecutionSession &ES) | |
virtual | ~IRLayer () |
ExecutionSession & | getExecutionSession () |
Returns the ExecutionSession for this layer. More... | |
void | setCloneToNewContextOnEmit (bool CloneToNewContextOnEmit) |
Sets the CloneToNewContextOnEmit flag (false by default). More... | |
bool | getCloneToNewContextOnEmit () const |
Returns the current value of the CloneToNewContextOnEmit flag. More... | |
virtual Error | add (JITDylib &JD, ThreadSafeModule TSM, VModuleKey K=VModuleKey()) |
Adds a MaterializationUnit representing the given IR to the given JITDylib. More... | |
Static Public Member Functions | |
static ThreadSafeModule | identityTransform (ThreadSafeModule TSM, const MaterializationResponsibility &R) |
Definition at line 26 of file IRTransformLayer.h.
using llvm::orc::IRTransformLayer::TransformFunction = std::function<Expected<ThreadSafeModule>( ThreadSafeModule, const MaterializationResponsibility &R)> |
Definition at line 29 of file IRTransformLayer.h.
llvm::orc::IRTransformLayer::IRTransformLayer | ( | ExecutionSession & | ES, |
IRLayer & | BaseLayer, | ||
TransformFunction | Transform = identityTransform |
||
) |
Definition at line 16 of file IRTransformLayer.cpp.
|
overridevirtual |
Emit should materialize the given IR.
Implements llvm::orc::IRLayer.
Definition at line 21 of file IRTransformLayer.cpp.
References assert(), llvm::orc::IRLayer::emit(), llvm::orc::MaterializationResponsibility::failMaterialization(), llvm::orc::IRLayer::getExecutionSession(), llvm::orc::ThreadSafeModule::getModule(), and llvm::orc::ExecutionSession::reportError().
Referenced by setTransform().
|
inlinestatic |
Definition at line 41 of file IRTransformLayer.h.
|
inline |
Definition at line 34 of file IRTransformLayer.h.
References emit().