|
LLVM 22.0.0git
|
A layer that breaks up IR modules into smaller submodules that only contains looked up symbols. More...
#include "llvm/ExecutionEngine/Orc/IRPartitionLayer.h"
Public Types | |
| using | GlobalValueSet = std::set<const GlobalValue *> |
| using | PartitionFunction |
| Partitioning function. | |
Public Member Functions | |
| IRPartitionLayer (ExecutionSession &ES, IRLayer &BaseLayer) | |
| Construct a IRPartitionLayer. | |
| void | setPartitionFunction (PartitionFunction Partition) |
| Sets the partition function. | |
| void | emit (std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM) override |
| Emits the given module. | |
| Public Member Functions inherited from llvm::orc::IRLayer | |
| 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. | |
Static Public Member Functions | |
| static std::optional< GlobalValueSet > | compileRequested (GlobalValueSet Requested) |
| Off-the-shelf partitioning which compiles all requested symbols (usually a single function at a time). | |
| static std::optional< GlobalValueSet > | compileWholeModule (GlobalValueSet Requested) |
| Off-the-shelf partitioning which compiles whole modules whenever any symbol in them is requested. | |
Friends | |
| class | PartitioningIRMaterializationUnit |
A layer that breaks up IR modules into smaller submodules that only contains looked up symbols.
Definition at line 38 of file IRPartitionLayer.h.
| using llvm::orc::IRPartitionLayer::GlobalValueSet = std::set<const GlobalValue *> |
Definition at line 42 of file IRPartitionLayer.h.
Partitioning function.
Definition at line 45 of file IRPartitionLayer.h.
| IRPartitionLayer::IRPartitionLayer | ( | ExecutionSession & | ES, |
| IRLayer & | BaseLayer ) |
Construct a IRPartitionLayer.
Definition at line 102 of file IRPartitionLayer.cpp.
References llvm::orc::IRLayer::getManglingOptions(), and llvm::orc::IRLayer::IRLayer().
|
static |
Off-the-shelf partitioning which compiles all requested symbols (usually a single function at a time).
Definition at line 110 of file IRPartitionLayer.cpp.
|
static |
Off-the-shelf partitioning which compiles whole modules whenever any symbol in them is requested.
Definition at line 115 of file IRPartitionLayer.cpp.
|
overridevirtual |
Emits the given module.
This should not be called by clients: it will be called by the JIT when a definition added via the add method is requested.
Implements llvm::orc::IRLayer.
Definition at line 119 of file IRPartitionLayer.cpp.
References assert(), llvm::orc::IRLayer::getExecutionSession(), llvm::orc::IRLayer::getManglingOptions(), and llvm::orc::ThreadSafeModule::withModuleDo().
| void IRPartitionLayer::setPartitionFunction | ( | PartitionFunction | Partition | ) |
Sets the partition function.
Definition at line 105 of file IRPartitionLayer.cpp.
|
friend |
Definition at line 39 of file IRPartitionLayer.h.
References PartitioningIRMaterializationUnit.
Referenced by PartitioningIRMaterializationUnit.