LLVM 20.0.0git
|
#include "llvm/ExecutionEngine/Orc/Speculation.h"
Public Types | |
using | IRlikiesStrRef = std::optional< DenseMap< StringRef, DenseSet< StringRef > > > |
using | ResultEval = std::function< IRlikiesStrRef(Function &)> |
using | TargetAndLikelies = DenseMap< SymbolStringPtr, SymbolNameSet > |
Public Member Functions | |
IRSpeculationLayer (ExecutionSession &ES, IRLayer &BaseLayer, Speculator &Spec, MangleAndInterner &Mangle, ResultEval Interpreter) | |
void | emit (std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM) override |
Emit should materialize the given IR. | |
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. | |
virtual void | emit (std::unique_ptr< MaterializationResponsibility > R, ThreadSafeModule TSM)=0 |
Emit should materialize the given IR. | |
Definition at line 171 of file Speculation.h.
using llvm::orc::IRSpeculationLayer::IRlikiesStrRef = std::optional<DenseMap<StringRef, DenseSet<StringRef> >> |
Definition at line 173 of file Speculation.h.
using llvm::orc::IRSpeculationLayer::ResultEval = std::function<IRlikiesStrRef(Function &)> |
Definition at line 175 of file Speculation.h.
Definition at line 176 of file Speculation.h.
|
inline |
Definition at line 178 of file Speculation.h.
|
overridevirtual |
Emit should materialize the given IR.
Implements llvm::orc::IRLayer.
Definition at line 57 of file Speculation.cpp.
References assert(), llvm::Function::Create(), llvm::BasicBlock::Create(), llvm::StructType::create(), llvm::IRBuilderBase::CreateBr(), llvm::IRBuilderBase::CreateCall(), llvm::IRBuilderBase::CreateCondBr(), llvm::IRBuilderBase::CreateICmpEQ(), llvm::IRBuilderBase::CreateLoad(), llvm::IRBuilderBase::CreatePtrToInt(), llvm::IRBuilderBase::CreateStore(), llvm::orc::IRLayer::emit(), llvm::GlobalValue::ExternalLinkage, llvm::FunctionType::get(), llvm::orc::ThreadSafeContext::getContext(), llvm::orc::ThreadSafeModule::getContext(), llvm::IRBuilderBase::GetInsertBlock(), llvm::Type::getInt64Ty(), llvm::Type::getInt8Ty(), llvm::BasicBlock::getParent(), llvm::PointerType::getUnqual(), llvm::Type::getVoidTy(), llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::Local, llvm::orc::Speculator::registerSymbols(), llvm::IRBuilderBase::SetInsertPoint(), and llvm::orc::ThreadSafeModule::withModuleDo().