Go to the documentation of this file.
13 #ifndef LLVM_EXECUTIONENGINE_ORC_LAYER_H
14 #define LLVM_EXECUTIONENGINE_ORC_LAYER_H
92 this->CloneToNewContextOnEmit = CloneToNewContextOnEmit;
109 virtual void emit(std::unique_ptr<MaterializationResponsibility> R,
113 bool CloneToNewContextOnEmit =
false;
127 void materialize(std::unique_ptr<MaterializationResponsibility> R)
override;
166 virtual void emit(std::unique_ptr<MaterializationResponsibility> R,
167 std::unique_ptr<MemoryBuffer>
O) = 0;
182 std::unique_ptr<MemoryBuffer> O,
189 void materialize(std::unique_ptr<MaterializationResponsibility> R)
override;
193 std::unique_ptr<MemoryBuffer> O;
199 #endif // LLVM_EXECUTIONENGINE_ORC_LAYER_H
This is an optimization pass for GlobalISel generic memory operations.
Represents a JIT'd dynamic library.
IRMaterializationUnit is a convenient base class for MaterializationUnits wrapping LLVM IR.
ResourceTrackerSP getDefaultResourceTracker()
Get the default resource tracker for this JITDylib.
Pointer to a pooled string representing a symbol name.
virtual Error add(ResourceTrackerSP RT, std::unique_ptr< MemoryBuffer > O, MaterializationUnit::Interface I)
Adds a MaterializationUnit for the object file in the given memory buffer to the JITDylib for the giv...
const IRSymbolMapper::ManglingOptions *& getManglingOptions() const
Get the mangling options for this layer.
Tagged union holding either a T or a Error.
A MaterializationUnit represents a set of symbol definitions that can be materialized as a group,...
StringRef getName() const override
Return the buffer's identifier as the name for this MaterializationUnit.
void setCloneToNewContextOnEmit(bool CloneToNewContextOnEmit)
Sets the CloneToNewContextOnEmit flag (false by default).
ExecutionSession & getExecutionSession()
Returns the execution session for this layer.
Interface for Layers that accept object files.
IRMaterializationUnit(ExecutionSession &ES, const IRSymbolMapper::ManglingOptions &MO, ThreadSafeModule TSM)
Create an IRMaterializationLayer.
const ThreadSafeModule & getModule() const
Return a reference to the contained ThreadSafeModule.
Inheritance utility for extensible RTTI.
virtual Error add(ResourceTrackerSP RT, ThreadSafeModule TSM)
Add a MaterializatinoUnit representing the given IR to the JITDylib targeted by the given tracker.
virtual void emit(std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM)=0
Emit should materialize the given IR.
static Expected< std::unique_ptr< BasicObjectLayerMaterializationUnit > > Create(ObjectLayer &L, std::unique_ptr< MemoryBuffer > O)
Create using the default object interface builder function.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
uint8_t IntrusiveRefCntPtr< ResourceTracker > ResourceTrackerSP
bool getCloneToNewContextOnEmit() const
Returns the current value of the CloneToNewContextOnEmit flag.
ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this layer.
Error add(JITDylib &JD, ThreadSafeModule TSM)
Adds a MaterializationUnit representing the given IR to the given JITDylib.
BasicObjectLayerMaterializationUnit(ObjectLayer &L, std::unique_ptr< MemoryBuffer > O, Interface I)
virtual void emit(std::unique_ptr< MaterializationResponsibility > R, std::unique_ptr< MemoryBuffer > O)=0
Emit should materialize the given IR.
StringRef - Represent a constant reference to a string, i.e.
BasicIRLayerMaterializationUnit(IRLayer &L, const IRSymbolMapper::ManglingOptions &MO, ThreadSafeModule TSM)
Materializes the given object file (represented by a MemoryBuffer instance) by calling 'emit' on the ...
Lightweight error class with error context and mandatory checking.
IRLayer(ExecutionSession &ES, const IRSymbolMapper::ManglingOptions *&MO)
An ExecutionSession represents a running JIT program.
An LLVM Module together with a shared ThreadSafeContext.
SymbolNameToDefinitionMap SymbolToDefinition
ObjectLayer(ExecutionSession &ES)
MaterializationUnit that materializes modules by calling the 'emit' method on the given IRLayer.
std::map< SymbolStringPtr, GlobalValue * > SymbolNameToDefinitionMap
StringRef getName() const override
Return the ModuleIdentifier as the name for this MaterializationUnit.
Interface for layers that accept LLVM IR.
Error add(JITDylib &JD, std::unique_ptr< MemoryBuffer > O, MaterializationUnit::Interface I)
Adds a MaterializationUnit for the object file in the given memory buffer to the given JITDylib.