LLVM API Documentation

Public Member Functions
llvm::EngineBuilder Class Reference

#include <ExecutionEngine.h>

List of all members.

Public Member Functions

 EngineBuilder (std::unique_ptr< Module > M)
 Constructor for EngineBuilder.
EngineBuildersetEngineKind (EngineKind::Kind w)
EngineBuildersetMCJITMemoryManager (RTDyldMemoryManager *mcjmm)
EngineBuildersetJITMemoryManager (JITMemoryManager *jmm)
EngineBuildersetErrorStr (std::string *e)
EngineBuildersetOptLevel (CodeGenOpt::Level l)
EngineBuildersetTargetOptions (const TargetOptions &Opts)
EngineBuildersetRelocationModel (Reloc::Model RM)
EngineBuildersetCodeModel (CodeModel::Model M)
EngineBuildersetMArch (StringRef march)
 setMArch - Override the architecture set by the Module's triple.
EngineBuildersetMCPU (StringRef mcpu)
 setMCPU - Target a specific cpu type.
EngineBuildersetVerifyModules (bool Verify)
template<typename StringSequence >
EngineBuildersetMAttrs (const StringSequence &mattrs)
 setMAttrs - Set cpu-specific attributes.
TargetMachineselectTarget ()
TargetMachineselectTarget (const Triple &TargetTriple, StringRef MArch, StringRef MCPU, const SmallVectorImpl< std::string > &MAttrs)
ExecutionEnginecreate ()
ExecutionEnginecreate (TargetMachine *TM)

Detailed Description

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.


Constructor & Destructor Documentation

llvm::EngineBuilder::EngineBuilder ( std::unique_ptr< Module M) [inline]

Constructor for EngineBuilder.

Definition at line 511 of file ExecutionEngine/ExecutionEngine.h.


Member Function Documentation

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 
)

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().

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().

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.

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().

template<typename StringSequence >
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().

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().

setMCPU - Target a specific cpu type.

Definition at line 591 of file ExecutionEngine/ExecutionEngine.h.

References llvm::StringRef::begin(), and llvm::StringRef::end().

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().

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.

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().

setVerifyModules - Set whether the JIT implementation should verify IR modules during compilation.

Definition at line 598 of file ExecutionEngine/ExecutionEngine.h.

References Verify.


The documentation for this class was generated from the following files: