|
LLVM
3.7.0
|
Builder class for ExecutionEngines. More...
#include <ExecutionEngine.h>
Public Member Functions | |
| EngineBuilder () | |
| Default constructor for EngineBuilder. More... | |
| EngineBuilder (std::unique_ptr< Module > M) | |
| Constructor for EngineBuilder. More... | |
| ~EngineBuilder () | |
| EngineBuilder & | setEngineKind (EngineKind::Kind w) |
| setEngineKind - Controls whether the user wants the interpreter, the JIT, or whichever engine works. More... | |
| EngineBuilder & | setMCJITMemoryManager (std::unique_ptr< RTDyldMemoryManager > mcjmm) |
| setMCJITMemoryManager - Sets the MCJIT memory manager to use. More... | |
| EngineBuilder & | setMemoryManager (std::unique_ptr< MCJITMemoryManager > MM) |
| EngineBuilder & | setSymbolResolver (std::unique_ptr< RuntimeDyld::SymbolResolver > SR) |
| EngineBuilder & | setErrorStr (std::string *e) |
| setErrorStr - Set the error string to write to on error. More... | |
| EngineBuilder & | setOptLevel (CodeGenOpt::Level l) |
| setOptLevel - Set the optimization level for the JIT. More... | |
| EngineBuilder & | setTargetOptions (const TargetOptions &Opts) |
| setTargetOptions - Set the target options that the ExecutionEngine target is using. More... | |
| EngineBuilder & | setRelocationModel (Reloc::Model RM) |
| setRelocationModel - Set the relocation model that the ExecutionEngine target is using. More... | |
| EngineBuilder & | setCodeModel (CodeModel::Model M) |
| setCodeModel - Set the CodeModel that the ExecutionEngine target data is using. More... | |
| EngineBuilder & | setMArch (StringRef march) |
| setMArch - Override the architecture set by the Module's triple. More... | |
| EngineBuilder & | setMCPU (StringRef mcpu) |
| setMCPU - Target a specific cpu type. More... | |
| EngineBuilder & | setVerifyModules (bool Verify) |
| setVerifyModules - Set whether the JIT implementation should verify IR modules during compilation. More... | |
| template<typename StringSequence > | |
| EngineBuilder & | setMAttrs (const StringSequence &mattrs) |
| setMAttrs - Set cpu-specific attributes. More... | |
| void | setUseOrcMCJITReplacement (bool UseOrcMCJITReplacement) |
| TargetMachine * | selectTarget () |
| TargetMachine * | selectTarget (const Triple &TargetTriple, StringRef MArch, StringRef MCPU, const SmallVectorImpl< std::string > &MAttrs) |
| selectTarget - Pick a target either via -march or by guessing the native arch. More... | |
| ExecutionEngine * | create () |
| ExecutionEngine * | create (TargetMachine *TM) |
Builder class for ExecutionEngines.
Use this by stack-allocating a builder, chaining the various set* methods, and terminating it with a .create() call.
Definition at line 505 of file ExecutionEngine/ExecutionEngine.h.
| EngineBuilder::EngineBuilder | ( | ) |
Default constructor for EngineBuilder.
Definition at line 466 of file ExecutionEngine.cpp.
| EngineBuilder::EngineBuilder | ( | std::unique_ptr< Module > | M | ) |
Constructor for EngineBuilder.
Definition at line 468 of file ExecutionEngine.cpp.
|
default |
|
inline |
Definition at line 630 of file ExecutionEngine/ExecutionEngine.h.
References selectTarget().
Referenced by LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
| ExecutionEngine * EngineBuilder::create | ( | TargetMachine * | TM | ) |
Definition at line 504 of file ExecutionEngine.cpp.
References llvm::ExecutionEngine::addModule(), llvm::errs(), llvm::TargetMachine::getTarget(), llvm::Target::hasJIT(), llvm::ExecutionEngine::InterpCtor, llvm::EngineKind::Interpreter, llvm::EngineKind::JIT, llvm::sys::DynamicLibrary::LoadLibraryPermanently(), llvm::ExecutionEngine::MCJITCtor, llvm::ExecutionEngine::OrcMCJITReplacementCtor, and llvm::ExecutionEngine::setVerifyModules().
| TargetMachine * EngineBuilder::selectTarget | ( | ) |
Definition at line 28 of file TargetSelect.cpp.
References llvm::EngineKind::Interpreter, and llvm::Triple::setTriple().
Referenced by create().
| TargetMachine * EngineBuilder::selectTarget | ( | const Triple & | TargetTriple, |
| StringRef | MArch, | ||
| StringRef | MCPU, | ||
| const SmallVectorImpl< std::string > & | MAttrs | ||
| ) |
selectTarget - Pick a target either via -march or by guessing the native arch.
Add any CPU features specified via -mcpu or -mattr.
Definition at line 41 of file TargetSelect.cpp.
References llvm::SubtargetFeatures::AddFeature(), llvm::Triple::arm, llvm::sys::path::begin(), llvm::Target::createTargetMachine(), llvm::SmallVectorBase::empty(), llvm::StringRef::empty(), llvm::sys::path::end(), llvm::lltok::Error, Features, llvm::Triple::getArch(), llvm::Triple::getArchTypeForLLVMName(), llvm::Target::getName(), llvm::sys::getProcessTriple(), llvm::SubtargetFeatures::getString(), llvm::Triple::getTriple(), I, llvm::Triple::isiOS(), llvm::CodeGenOpt::Less, llvm::TargetRegistry::lookupTarget(), llvm::CodeGenOpt::None, llvm::Triple::setArch(), llvm::Triple::setTriple(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::TargetRegistry::targets(), and llvm::Triple::UnknownArch.
|
inline |
setCodeModel - Set the CodeModel that the ExecutionEngine target data is using.
Defaults to target specific default "CodeModel::JITDefault".
Definition at line 584 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateMCJITCompilerForModule().
|
inline |
setEngineKind - Controls whether the user wants the interpreter, the JIT, or whichever engine works.
This option defaults to EngineKind::Either.
Definition at line 534 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
|
inline |
setErrorStr - Set the error string to write to on error.
This option defaults to NULL.
Definition at line 555 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
|
inline |
setMArch - Override the architecture set by the Module's triple.
Definition at line 590 of file ExecutionEngine/ExecutionEngine.h.
References llvm::StringRef::begin(), and llvm::StringRef::end().
|
inline |
setMAttrs - Set cpu-specific attributes.
Definition at line 610 of file ExecutionEngine/ExecutionEngine.h.
References llvm::SmallVectorImpl< T >::append(), and llvm::SmallVectorImpl< T >::clear().
| EngineBuilder & EngineBuilder::setMCJITMemoryManager | ( | std::unique_ptr< RTDyldMemoryManager > | mcjmm | ) |
setMCJITMemoryManager - Sets the MCJIT memory manager to use.
This allows clients to customize their memory allocation policies for the MCJIT. This is only appropriate for the MCJIT; setting this and configuring the builder to create anything other than MCJIT will cause a runtime error. If create() is called and is successful, the created engine takes ownership of the memory manager. This option defaults to NULL.
Definition at line 484 of file ExecutionEngine.cpp.
Referenced by LLVMCreateMCJITCompilerForModule().
|
inline |
setMCPU - Target a specific cpu type.
Definition at line 596 of file ExecutionEngine/ExecutionEngine.h.
References llvm::StringRef::begin(), and llvm::StringRef::end().
| EngineBuilder & EngineBuilder::setMemoryManager | ( | std::unique_ptr< MCJITMemoryManager > | MM | ) |
Definition at line 493 of file ExecutionEngine.cpp.
|
inline |
setOptLevel - Set the optimization level for the JIT.
This option defaults to CodeGenOpt::Default.
Definition at line 562 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
|
inline |
setRelocationModel - Set the relocation model that the ExecutionEngine target is using.
Defaults to target specific default "Reloc::Default".
Definition at line 576 of file ExecutionEngine/ExecutionEngine.h.
References llvm::NVPTX::PTXCvtMode::RM.
| EngineBuilder & EngineBuilder::setSymbolResolver | ( | std::unique_ptr< RuntimeDyld::SymbolResolver > | SR | ) |
Definition at line 499 of file ExecutionEngine.cpp.
|
inline |
setTargetOptions - Set the target options that the ExecutionEngine target is using.
Defaults to TargetOptions().
Definition at line 569 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateMCJITCompilerForModule().
|
inline |
Definition at line 617 of file ExecutionEngine/ExecutionEngine.h.
|
inline |
setVerifyModules - Set whether the JIT implementation should verify IR modules during compilation.
Definition at line 603 of file ExecutionEngine/ExecutionEngine.h.
References Verify.
1.8.6