LLVM: lib/ExecutionEngine/Orc/IRTransformLayer.cpp Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
10
11namespace llvm {
12namespace orc {
13
17 Transform(std::move(Transform)) {}
18
21 assert(TSM && "Module must not be null");
22
23 if (auto TransformedTSM = Transform(std::move(TSM), *R))
24 BaseLayer.emit(std::move(R), std::move(*TransformedTSM));
25 else {
26 R->failMaterialization();
28 }
29}
30
31}
32}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
An ExecutionSession represents a running JIT program.
void reportError(Error Err)
Report a error for this execution session.
IRLayer(ExecutionSession &ES, const IRSymbolMapper::ManglingOptions *&MO)
ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this layer.
const IRSymbolMapper::ManglingOptions *& getManglingOptions() const
Get the mangling options for this layer.
unique_function< Expected< ThreadSafeModule >( ThreadSafeModule, MaterializationResponsibility &R)> TransformFunction
void emit(std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM) override
Emit should materialize the given IR.
Definition IRTransformLayer.cpp:19
IRTransformLayer(ExecutionSession &ES, IRLayer &BaseLayer, TransformFunction Transform=identityTransform)
Definition IRTransformLayer.cpp:14
An LLVM Module together with a shared ThreadSafeContext.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.