LLVM API Documentation
#include <ExecutionEngine.h>
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 490 of file ExecutionEngine/ExecutionEngine.h.
llvm::EngineBuilder::EngineBuilder | ( | std::unique_ptr< Module > | M | ) | [inline] |
Constructor for EngineBuilder.
Definition at line 511 of file ExecutionEngine/ExecutionEngine.h.
ExecutionEngine* llvm::EngineBuilder::create | ( | ) | [inline] |
Definition at line 620 of file ExecutionEngine/ExecutionEngine.h.
References selectTarget().
Referenced by LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
Definition at line 418 of file ExecutionEngine.cpp.
References llvm::errs(), llvm::TargetMachine::getTarget(), llvm::Target::hasJIT(), llvm::ExecutionEngine::InterpCtor, llvm::EngineKind::Interpreter, llvm::EngineKind::JIT, llvm::sys::DynamicLibrary::LoadLibraryPermanently(), llvm::ExecutionEngine::MCJITCtor, and llvm::ExecutionEngine::setVerifyModules().
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::TargetRegistry::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::sys::getProcessTriple(), llvm::SubtargetFeatures::getString(), llvm::Triple::getTriple(), llvm::Triple::isiOS(), llvm::CodeGenOpt::Less, llvm::TargetRegistry::lookupTarget(), llvm::None, llvm::Triple::setArch(), llvm::Triple::setTriple(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::Triple::UnknownArch.
EngineBuilder& llvm::EngineBuilder::setCodeModel | ( | CodeModel::Model | M | ) | [inline] |
setCodeModel - Set the CodeModel that the ExecutionEngine target data is using. Defaults to target specific default "CodeModel::JITDefault".
Definition at line 579 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateMCJITCompilerForModule().
EngineBuilder& llvm::EngineBuilder::setEngineKind | ( | EngineKind::Kind | w | ) | [inline] |
setEngineKind - Controls whether the user wants the interpreter, the JIT, or whichever engine works. This option defaults to EngineKind::Either.
Definition at line 517 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
EngineBuilder& llvm::EngineBuilder::setErrorStr | ( | std::string * | e | ) | [inline] |
setErrorStr - Set the error string to write to on error. This option defaults to NULL.
Definition at line 550 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
EngineBuilder& llvm::EngineBuilder::setJITMemoryManager | ( | JITMemoryManager * | jmm | ) | [inline] |
setJITMemoryManager - Sets the JIT memory manager to use. This allows clients to customize their memory allocation policies. This is only appropriate for either JIT or MCJIT; setting this and configuring the builder to create an interpreter 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. This option overrides setMCJITMemoryManager() as well.
Definition at line 542 of file ExecutionEngine/ExecutionEngine.h.
EngineBuilder& llvm::EngineBuilder::setMArch | ( | StringRef | march | ) | [inline] |
setMArch - Override the architecture set by the Module's triple.
Definition at line 585 of file ExecutionEngine/ExecutionEngine.h.
References llvm::StringRef::begin(), and llvm::StringRef::end().
EngineBuilder& llvm::EngineBuilder::setMAttrs | ( | const StringSequence & | mattrs | ) | [inline] |
setMAttrs - Set cpu-specific attributes.
Definition at line 605 of file ExecutionEngine/ExecutionEngine.h.
References llvm::SmallVectorImpl< T >::append(), and llvm::SmallVectorImpl< T >::clear().
EngineBuilder& llvm::EngineBuilder::setMCJITMemoryManager | ( | RTDyldMemoryManager * | mcjmm | ) | [inline] |
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. Using this option nullifies the setJITMemoryManager() option.
Definition at line 529 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateMCJITCompilerForModule().
EngineBuilder& llvm::EngineBuilder::setMCPU | ( | StringRef | mcpu | ) | [inline] |
setMCPU - Target a specific cpu type.
Definition at line 591 of file ExecutionEngine/ExecutionEngine.h.
References llvm::StringRef::begin(), and llvm::StringRef::end().
EngineBuilder& llvm::EngineBuilder::setOptLevel | ( | CodeGenOpt::Level | l | ) | [inline] |
setOptLevel - Set the optimization level for the JIT. This option defaults to CodeGenOpt::Default.
Definition at line 557 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
EngineBuilder& llvm::EngineBuilder::setRelocationModel | ( | Reloc::Model | RM | ) | [inline] |
setRelocationModel - Set the relocation model that the ExecutionEngine target is using. Defaults to target specific default "Reloc::Default".
Definition at line 571 of file ExecutionEngine/ExecutionEngine.h.
References llvm::NVPTX::PTXCvtMode::RM.
EngineBuilder& llvm::EngineBuilder::setTargetOptions | ( | const TargetOptions & | Opts | ) | [inline] |
setTargetOptions - Set the target options that the ExecutionEngine target is using. Defaults to TargetOptions().
Definition at line 564 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateMCJITCompilerForModule().
EngineBuilder& llvm::EngineBuilder::setVerifyModules | ( | bool | Verify | ) | [inline] |
setVerifyModules - Set whether the JIT implementation should verify IR modules during compilation.
Definition at line 598 of file ExecutionEngine/ExecutionEngine.h.
References Verify.