LLVM API Documentation
#include <ExecutionEngine.h>
EngineBuilder - 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 509 of file ExecutionEngine/ExecutionEngine.h.
|
inline |
EngineBuilder - Constructor for EngineBuilder. If create() is called and is successful, the created engine takes ownership of the module.
Definition at line 543 of file ExecutionEngine/ExecutionEngine.h.
|
inline |
Definition at line 664 of file ExecutionEngine/ExecutionEngine.h.
References selectTarget().
Referenced by llvm::ExecutionEngine::create(), LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
ExecutionEngine * EngineBuilder::create | ( | TargetMachine * | TM | ) |
Definition at line 445 of file ExecutionEngine.cpp.
References llvm::errs(), llvm::TargetMachine::getTarget(), llvm::Module::getTargetTriple(), llvm::Target::hasJIT(), llvm::ExecutionEngine::InterpCtor, llvm::EngineKind::Interpreter, llvm::EngineKind::JIT, llvm::ExecutionEngine::JITCtor, llvm::sys::DynamicLibrary::LoadLibraryPermanently(), llvm::ExecutionEngine::MCJITCtor, and llvm::OwningPtr< T >::take().
TargetMachine * EngineBuilder::selectTarget | ( | ) |
Definition at line 28 of file TargetSelect.cpp.
References llvm::Module::getTargetTriple(), llvm::EngineKind::Interpreter, and llvm::Triple::setTriple().
Referenced by create(), and llvm::ExecutionEngine::createJIT().
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::TargetRegistry::end(), llvm::lltok::Error, 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::CodeGenOpt::None, llvm::Triple::setArch(), llvm::Triple::setTriple(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::Triple::UnknownArch.
|
inline |
setAllocateGVsWithCode - Sets whether global values should be allocated into the same buffer as code. For most applications this should be set to false. Allocating globals with code breaks freeMachineCodeForFunction and is probably unsafe and bad for performance. However, we have clients who depend on this behavior, so we must support it. This option defaults to false so that users of the new API can safely use the new memory manager and free machine code.
Definition at line 623 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::ExecutionEngine::createJIT().
|
inline |
setCodeModel - Set the CodeModel that the ExecutionEngine target data is using. Defaults to target specific default "CodeModel::JITDefault".
Definition at line 611 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::ExecutionEngine::createJIT(), and 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 549 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::ExecutionEngine::createJIT(), LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
|
inline |
setErrorStr - Set the error string to write to on error. This option defaults to NULL.
Definition at line 582 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::ExecutionEngine::createJIT(), LLVMCreateExecutionEngineForModule(), LLVMCreateInterpreterForModule(), LLVMCreateJITCompilerForModule(), and LLVMCreateMCJITCompilerForModule().
|
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 574 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::ExecutionEngine::createJIT().
|
inline |
setMArch - Override the architecture set by the Module's triple.
Definition at line 629 of file ExecutionEngine/ExecutionEngine.h.
References llvm::StringRef::begin(), and llvm::StringRef::end().
|
inline |
setMAttrs - Set cpu-specific attributes.
Definition at line 649 of file ExecutionEngine/ExecutionEngine.h.
References llvm::SmallVectorImpl< T >::append(), and llvm::SmallVectorImpl< T >::clear().
|
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 561 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateMCJITCompilerForModule().
|
inline |
setMCPU - Target a specific cpu type.
Definition at line 635 of file ExecutionEngine/ExecutionEngine.h.
References llvm::StringRef::begin(), and llvm::StringRef::end().
|
inline |
setOptLevel - Set the optimization level for the JIT. This option defaults to CodeGenOpt::Default.
Definition at line 589 of file ExecutionEngine/ExecutionEngine.h.
Referenced by llvm::ExecutionEngine::createJIT(), 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 603 of file ExecutionEngine/ExecutionEngine.h.
References llvm::NVPTX::PTXCvtMode::RM.
Referenced by llvm::ExecutionEngine::createJIT().
|
inline |
setTargetOptions - Set the target options that the ExecutionEngine target is using. Defaults to TargetOptions().
Definition at line 596 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateMCJITCompilerForModule().
|
inline |
setUseMCJIT - Set whether the MC-JIT implementation should be used (experimental).
Definition at line 642 of file ExecutionEngine/ExecutionEngine.h.
Referenced by LLVMCreateMCJITCompilerForModule().