LLVM API Documentation

Public Member Functions
llvm::EngineBuilder Class Reference

#include <ExecutionEngine.h>

List of all members.

Public Member Functions

 EngineBuilder (Module *m)
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)
EngineBuildersetAllocateGVsWithCode (bool a)
EngineBuildersetMArch (StringRef march)
 setMArch - Override the architecture set by the Module's triple.
EngineBuildersetMCPU (StringRef mcpu)
 setMCPU - Target a specific cpu type.
EngineBuildersetUseMCJIT (bool Value)
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

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 497 of file ExecutionEngine/ExecutionEngine.h.


Constructor & Destructor Documentation

llvm::EngineBuilder::EngineBuilder ( Module m) [inline]

EngineBuilder - Constructor for EngineBuilder. If create() is called and is successful, the created engine takes ownership of the module.

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


Member Function Documentation

ExecutionEngine* llvm::EngineBuilder::create ( ) [inline]
ExecutionEngine * EngineBuilder::create ( TargetMachine TM)
TargetMachine * EngineBuilder::selectTarget ( )
TargetMachine * EngineBuilder::selectTarget ( const Triple TargetTriple,
StringRef  MArch,
StringRef  MCPU,
const SmallVectorImpl< std::string > &  MAttrs 
)
EngineBuilder& llvm::EngineBuilder::setAllocateGVsWithCode ( bool  a) [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 611 of file ExecutionEngine/ExecutionEngine.h.

Referenced by llvm::ExecutionEngine::createJIT().

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 599 of file ExecutionEngine/ExecutionEngine.h.

Referenced by llvm::ExecutionEngine::createJIT(), and 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 537 of file ExecutionEngine/ExecutionEngine.h.

Referenced by llvm::ExecutionEngine::createJIT(), 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 570 of file ExecutionEngine/ExecutionEngine.h.

Referenced by llvm::ExecutionEngine::createJIT(), 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 562 of file ExecutionEngine/ExecutionEngine.h.

Referenced by llvm::ExecutionEngine::createJIT().

EngineBuilder& llvm::EngineBuilder::setMArch ( StringRef  march) [inline]

setMArch - Override the architecture set by the Module's triple.

Definition at line 617 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 637 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 549 of file ExecutionEngine/ExecutionEngine.h.

Referenced by LLVMCreateMCJITCompilerForModule().

EngineBuilder& llvm::EngineBuilder::setMCPU ( StringRef  mcpu) [inline]

setMCPU - Target a specific cpu type.

Definition at line 623 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 577 of file ExecutionEngine/ExecutionEngine.h.

Referenced by llvm::ExecutionEngine::createJIT(), 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 591 of file ExecutionEngine/ExecutionEngine.h.

Referenced by llvm::ExecutionEngine::createJIT().

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 584 of file ExecutionEngine/ExecutionEngine.h.

Referenced by LLVMCreateMCJITCompilerForModule().

EngineBuilder& llvm::EngineBuilder::setUseMCJIT ( bool  Value) [inline]

setUseMCJIT - Set whether the MC-JIT implementation should be used (experimental).

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

Referenced by LLVMCreateMCJITCompilerForModule().


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