LLVM API Documentation

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
llvm::ExecutionEngine Class Reference

Abstract interface for implementation execution of LLVM modules, designed to support both interpreter and just-in-time (JIT) compiler implementations. More...

#include <ExecutionEngine.h>

Inheritance diagram for llvm::ExecutionEngine:
Inheritance graph
[legend]
Collaboration diagram for llvm::ExecutionEngine:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~ExecutionEngine ()
virtual void addModule (std::unique_ptr< Module > M)
 Add a Module to the list of modules that we can JIT from.
virtual void addObjectFile (std::unique_ptr< object::ObjectFile > O)
virtual void addObjectFile (object::OwningBinary< object::ObjectFile > O)
virtual void addArchive (object::OwningBinary< object::Archive > A)
const DataLayoutgetDataLayout () const
virtual bool removeModule (Module *M)
virtual FunctionFindFunctionNamed (const char *FnName)
virtual GenericValue runFunction (Function *F, const std::vector< GenericValue > &ArgValues)=0
virtual void * getPointerToNamedFunction (StringRef Name, bool AbortOnFailure=true)=0
virtual void mapSectionAddress (const void *LocalAddress, uint64_t TargetAddress)
virtual void generateCodeForModule (Module *M)
virtual void finalizeObject ()
virtual void runStaticConstructorsDestructors (bool isDtors)
void runStaticConstructorsDestructors (Module &module, bool isDtors)
int runFunctionAsMain (Function *Fn, const std::vector< std::string > &argv, const char *const *envp)
void addGlobalMapping (const GlobalValue *GV, void *Addr)
void clearAllGlobalMappings ()
void clearGlobalMappingsFromModule (Module *M)
void * updateGlobalMapping (const GlobalValue *GV, void *Addr)
void * getPointerToGlobalIfAvailable (const GlobalValue *GV)
void * getPointerToGlobal (const GlobalValue *GV)
virtual void * getPointerToFunction (Function *F)=0
virtual void * getPointerToFunctionOrStub (Function *F)
virtual uint64_t getGlobalValueAddress (const std::string &Name)
virtual uint64_t getFunctionAddress (const std::string &Name)
const GlobalValuegetGlobalValueAtAddress (void *Addr)
void StoreValueToMemory (const GenericValue &Val, GenericValue *Ptr, Type *Ty)
void InitializeMemory (const Constant *Init, void *Addr)
virtual void * getOrEmitGlobalVariable (const GlobalVariable *GV)
virtual void RegisterJITEventListener (JITEventListener *)
virtual void UnregisterJITEventListener (JITEventListener *)
virtual void setObjectCache (ObjectCache *)
virtual void setProcessAllSections (bool ProcessAllSections)
virtual TargetMachinegetTargetMachine ()
 Return the target machine (if available).
void DisableLazyCompilation (bool Disabled=true)
bool isCompilingLazily () const
void DisableGVCompilation (bool Disabled=true)
bool isGVCompilationDisabled () const
void DisableSymbolSearching (bool Disabled=true)
bool isSymbolSearchingDisabled () const
void setVerifyModules (bool Verify)
bool getVerifyModules () const
void InstallLazyFunctionCreator (void *(*P)(const std::string &))

Public Attributes

sys::Mutex lock

Protected Member Functions

void setDataLayout (const DataLayout *Val)
virtual char * getMemoryForGV (const GlobalVariable *GV)
 getMemoryforGV - Allocate memory for a global variable.
 ExecutionEngine (std::unique_ptr< Module > M)
void emitGlobals ()
void EmitGlobalVariable (const GlobalVariable *GV)
GenericValue getConstantValue (const Constant *C)
 Converts a Constant* into a GenericValue, including handling of ConstantExpr values.
void LoadValueFromMemory (GenericValue &Result, GenericValue *Ptr, Type *Ty)

Protected Attributes

SmallVector< std::unique_ptr
< Module >, 1 > 
Modules
void *(* LazyFunctionCreator )(const std::string &)

Static Protected Attributes

static ExecutionEngine *(* MCJITCtor )(std::unique_ptr< Module > M, std::string *ErrorStr, RTDyldMemoryManager *MCJMM, std::unique_ptr< TargetMachine > TM) = nullptr
static ExecutionEngine *(* InterpCtor )(std::unique_ptr< Module > M, std::string *ErrorStr) = nullptr

Friends

class EngineBuilder

Detailed Description

Abstract interface for implementation execution of LLVM modules, designed to support both interpreter and just-in-time (JIT) compiler implementations.

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


Constructor & Destructor Documentation

Definition at line 76 of file ExecutionEngine.cpp.

References clearAllGlobalMappings().

ExecutionEngine::ExecutionEngine ( std::unique_ptr< Module M) [explicit, protected]

Member Function Documentation

addArchive - Add an Archive to the execution engine.

This method is only supported by MCJIT. MCJIT will use the archive to resolve external symbols in objects it is loading. If a symbol is found in the Archive the contained object file will be extracted (in memory) and loaded for possible execution.

Reimplemented in llvm::MCJIT.

Definition at line 124 of file ExecutionEngine.cpp.

References llvm_unreachable.

void ExecutionEngine::addGlobalMapping ( const GlobalValue GV,
void *  Addr 
)

addGlobalMapping - Tell the execution engine that the specified global is at the specified location. This is used internally as functions are JIT'd and as global variables are laid out in memory. It can and should also be used by clients of the EE that want to have an LLVM global overlay existing data in memory. Mappings are automatically removed when their GlobalValue is destroyed.

Definition at line 167 of file ExecutionEngine.cpp.

References llvm::dbgs(), DEBUG, llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), llvm::Value::getName(), and lock.

Referenced by emitGlobals(), EmitGlobalVariable(), and llvm::MCJIT::getPointerToFunction().

virtual void llvm::ExecutionEngine::addModule ( std::unique_ptr< Module M) [inline, virtual]

Add a Module to the list of modules that we can JIT from.

Reimplemented in llvm::MCJIT.

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

References Modules, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().

void ExecutionEngine::addObjectFile ( std::unique_ptr< object::ObjectFile O) [virtual]

addObjectFile - Add an ObjectFile to the execution engine.

This method is only supported by MCJIT. MCJIT will immediately load the object into memory and adds its symbols to the list used to resolve external symbols while preparing other objects for execution.

Objects added using this function will not be made executable until needed by another object.

MCJIT will take ownership of the ObjectFile.

Reimplemented in llvm::MCJIT.

Definition at line 115 of file ExecutionEngine.cpp.

References llvm_unreachable.

Reimplemented in llvm::MCJIT.

Definition at line 120 of file ExecutionEngine.cpp.

References llvm_unreachable.

clearAllGlobalMappings - Clear all global mappings and start over again, for use in dynamic compilation scenarios to move globals.

Definition at line 185 of file ExecutionEngine.cpp.

References llvm::ValueMap< KeyT, ValueT, Config >::clear(), llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), and lock.

Referenced by ~ExecutionEngine().

clearGlobalMappingsFromModule - Clear all global mappings that came from a particular module, because it has been removed from the JIT.

Definition at line 192 of file ExecutionEngine.cpp.

References llvm::Module::begin(), llvm::Module::end(), llvm::AArch64CC::GE, llvm::Module::global_begin(), llvm::Module::global_end(), lock, and llvm::ExecutionEngineState::RemoveMapping().

Referenced by removeModule().

void llvm::ExecutionEngine::DisableGVCompilation ( bool  Disabled = true) [inline]

DisableGVCompilation - If called, the JIT will abort if it's asked to allocate space and populate a GlobalVariable that is not internal to the module.

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

References Disabled.

DisableLazyCompilation - When lazy compilation is off (the default), the JIT will eagerly compile every function reachable from the argument to getPointerToFunction. If lazy compilation is turned on, the JIT will only compile the one function and emit stubs to compile the rest when they're first called. If lazy compilation is turned off again while some lazy stubs are still around, and one of those stubs is called, the program will abort.

In order to safely compile lazily in a threaded program, the user must ensure that 1) only one thread at a time can call any particular lazy stub, and 2) any thread modifying LLVM IR must hold the JIT's lock (ExecutionEngine::lock) or otherwise ensure that no other thread calls a lazy stub. See http://llvm.org/PR5184 for details.

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

References Disabled.

DisableSymbolSearching - If called, the JIT will not try to lookup unknown symbols with dlsym. A client can still use InstallLazyFunctionCreator to resolve symbols in a custom way.

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

References Disabled.

void ExecutionEngine::emitGlobals ( ) [protected]
virtual void llvm::ExecutionEngine::finalizeObject ( ) [inline, virtual]

finalizeObject - ensure the module is fully processed and is usable.

It is the user-level function for completing the process of making the object usable for execution. It should be called after sections within an object have been relocated using mapSectionAddress. When this method is called the MCJIT execution engine will reapply relocations for a loaded object. This method has no effect for the interpeter.

Reimplemented in llvm::MCJIT.

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

Function * ExecutionEngine::FindFunctionNamed ( const char *  FnName) [virtual]

FindFunctionNamed - Search all of the active modules to find the one that defines FnName. This is very slow operation and shouldn't be used for general code.

Reimplemented in llvm::MCJIT.

Definition at line 141 of file ExecutionEngine.cpp.

References F(), Modules, and llvm::SmallVectorTemplateCommon< T, typename >::size().

virtual void llvm::ExecutionEngine::generateCodeForModule ( Module M) [inline, virtual]

generateCodeForModule - Run code generation for the specified module and load it into memory.

When this function has completed, all code and data for the specified module, and any module on which this module depends, will be generated and loaded into memory, but relocations will not yet have been applied and all memory will be readable and writable but not executable.

This function is primarily useful when generating code for an external target, allowing the client an opportunity to remap section addresses before relocations are applied. Clients that intend to execute code locally can use the getFunctionAddress call, which will generate code and apply final preparations all in one step.

This method has no effect for the interpeter.

Reimplemented in llvm::MCJIT.

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

Converts a Constant* into a GenericValue, including handling of ConstantExpr values.

Definition at line 499 of file ExecutionEngine.cpp.

References llvm::APFloat::add(), llvm::GenericValue::AggregateVal, llvm::APIntOps::And(), llvm::lltok::APFloat, llvm::APFloat::bitcastToAPInt(), llvm::APInt::bitsToDouble(), llvm::APInt::bitsToFloat(), llvm::CallingConv::C, llvm::WinEH::CE, llvm::APFloat::convertFromAPInt(), llvm::APFloat::convertToInteger(), llvm::APFloat::divide(), llvm::APInt::doubleToBits(), llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, llvm::dyn_cast(), F(), llvm::APInt::floatToBits(), llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::LibFunc::fmod, llvm::Type::FP128TyID, llvm::FPExt, llvm::FPToSI, llvm::UndefValue::get(), getBitWidth(), llvm::APInt::getBitWidth(), llvm::ConstantDataSequential::getElementAsDouble(), llvm::ConstantDataSequential::getElementAsFloat(), llvm::ConstantDataSequential::getElementAsInteger(), llvm::SequentialType::getElementType(), llvm::ConstantDataSequential::getElementType(), llvm::VectorType::getNumElements(), llvm::ConstantDataSequential::getNumElements(), getOrEmitGlobalVariable(), llvm::DataLayout::getPointerSizeInBits(), getPointerToFunctionOrStub(), llvm::Type::getPrimitiveSizeInBits(), llvm::Type::getScalarSizeInBits(), llvm::Value::getType(), llvm::Type::getTypeID(), llvm::DataLayout::getTypeSizeInBits(), llvm::APFloat::getZero(), llvm::APInt::getZExtValue(), llvm::Type::IntegerTyID, llvm::IntToPtr, llvm::GenericValue::IntVal, llvm::Type::isAggregateType(), llvm::Type::isDoubleTy(), llvm::Type::isFloatingPointTy(), llvm::Type::isFloatTy(), llvm::Type::isIntegerTy(), llvm::Type::isPointerTy(), llvm::Type::isX86_FP80Ty(), llvm_unreachable, llvm::APFloat::mod(), llvm::APFloat::multiply(), llvm::APIntOps::Or(), llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, llvm::Type::PPC_FP128TyID, llvm::PTOGV(), llvm::report_fatal_error(), llvm::APFloat::rmNearestTiesToEven, llvm::APFloat::rmTowardZero, llvm::APIntOps::RoundDoubleToAPInt(), llvm::APIntOps::RoundFloatToAPInt(), llvm::APInt::roundToDouble(), llvm::APInt::sdiv(), llvm::SExt, llvm::APInt::sext(), llvm::APInt::signedRoundToDouble(), llvm::SIToFP, llvm::APInt::srem(), llvm::raw_svector_ostream::str(), llvm::Type::StructTyID, llvm::APFloat::subtract(), llvm::Trunc, llvm::APInt::trunc(), llvm::APInt::udiv(), llvm::APInt::urem(), llvm::Type::VectorTyID, llvm::Type::X86_FP80TyID, llvm::APFloat::x87DoubleExtended, llvm::APIntOps::Xor(), llvm::APInt::zext(), and llvm::APInt::zextOrTrunc().

Referenced by InitializeMemory().

virtual uint64_t llvm::ExecutionEngine::getFunctionAddress ( const std::string &  Name) [inline, virtual]

getFunctionAddress - Return the address of the specified function. This may involve code generation.

Reimplemented in llvm::MCJIT.

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

virtual uint64_t llvm::ExecutionEngine::getGlobalValueAddress ( const std::string &  Name) [inline, virtual]

getGlobalValueAddress - Return the address of the specified global value. This may involve code generation.

This function should not be called with the interpreter engine.

Reimplemented in llvm::MCJIT.

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

getGlobalValueAtAddress - Return the LLVM global value object that starts at the specified address.

Definition at line 237 of file ExecutionEngine.cpp.

References llvm::ValueMap< KeyT, ValueT, Config >::begin(), llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), I, and lock.

char * ExecutionEngine::getMemoryForGV ( const GlobalVariable GV) [protected, virtual]

getMemoryforGV - Allocate memory for a global variable.

Definition at line 111 of file ExecutionEngine.cpp.

References getDataLayout().

Referenced by emitGlobals(), and EmitGlobalVariable().

virtual void* llvm::ExecutionEngine::getOrEmitGlobalVariable ( const GlobalVariable GV) [inline, virtual]

getOrEmitGlobalVariable - Return the address of the specified global variable, possibly emitting it to memory if needed. This is used by the Emitter.

This function is deprecated for the MCJIT execution engine. Use getGlobalValueAddress instead.

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

References getPointerToGlobal().

Referenced by getConstantValue().

virtual void* llvm::ExecutionEngine::getPointerToFunction ( Function F) [pure virtual]

getPointerToFunction - The different EE's represent function bodies in different ways. They should each implement this to say what a function pointer should look like. When F is destroyed, the ExecutionEngine will remove its global mapping and free any machine code. Be sure no threads are running inside F when that happens.

This function is deprecated for the MCJIT execution engine. Use getFunctionAddress instead.

Implemented in llvm::MCJIT.

Referenced by getPointerToFunctionOrStub(), and getPointerToGlobal().

virtual void* llvm::ExecutionEngine::getPointerToFunctionOrStub ( Function F) [inline, virtual]

getPointerToFunctionOrStub - If the specified function has been code-gen'd, return a pointer to the function. If not, compile it, or use a stub to implement lazy compilation if available. See getPointerToFunction for the requirements on destroying F.

This function is deprecated for the MCJIT execution engine. Use getFunctionAddress instead.

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

References getPointerToFunction().

Referenced by getConstantValue().

getPointerToGlobal - This returns the address of the specified global value. This may involve code generation if it's a function.

This function is deprecated for the MCJIT execution engine. Use getGlobalValueAddress instead.

Definition at line 479 of file ExecutionEngine.cpp.

References EmitGlobalVariable(), F(), llvm::ExecutionEngineState::getGlobalAddressMap(), getPointerToFunction(), llvm_unreachable, lock, and P.

Referenced by getOrEmitGlobalVariable().

getPointerToGlobalIfAvailable - This returns the address of the specified global value if it is has already been codegen'd, otherwise it returns null.

This function is deprecated for the MCJIT execution engine. It doesn't seem to be needed in that case, but an equivalent can be added if it is.

Definition at line 229 of file ExecutionEngine.cpp.

References llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::ValueMap< KeyT, ValueT, Config >::find(), llvm::ExecutionEngineState::getGlobalAddressMap(), I, lock, and llvm::ValueMapIterator< DenseMapT, KeyT >::ValueTypeProxy::second.

Referenced by llvm::Interpreter::callExternalFunction(), emitGlobals(), and EmitGlobalVariable().

virtual void* llvm::ExecutionEngine::getPointerToNamedFunction ( StringRef  Name,
bool  AbortOnFailure = true 
) [pure virtual]

getPointerToNamedFunction - This method returns the address of the specified function by using the dlsym function call. As such it is only useful for resolving library symbols, not code generated symbols.

If AbortOnFailure is false and no function with the given name is found, this function silently returns a null pointer. Otherwise, it prints a message to stderr and aborts.

This function is deprecated for the MCJIT execution engine.

Implemented in llvm::MCJIT, and llvm::Interpreter.

Return the target machine (if available).

Reimplemented in llvm::MCJIT.

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

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

Referenced by llvm::MCJIT::emitObject().

void ExecutionEngine::InitializeMemory ( const Constant Init,
void *  Addr 
)
void llvm::ExecutionEngine::InstallLazyFunctionCreator ( void *(*)(const std::string &)  P) [inline]

InstallLazyFunctionCreator - If an unknown function is needed, the specified function pointer is invoked to create it. If it returns null, the JIT will abort.

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

References LazyFunctionCreator, and P.

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

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

void ExecutionEngine::LoadValueFromMemory ( GenericValue Result,
GenericValue Ptr,
Type Ty 
) [protected]
virtual void llvm::ExecutionEngine::mapSectionAddress ( const void *  LocalAddress,
uint64_t  TargetAddress 
) [inline, virtual]

mapSectionAddress - map a section to its target address space value. Map the address of a JIT section as returned from the memory manager to the address in the target process as the running code will see it. This is the address which will be used for relocation resolution.

Reimplemented in llvm::MCJIT.

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

References llvm_unreachable.

virtual void llvm::ExecutionEngine::RegisterJITEventListener ( JITEventListener ) [inline, virtual]

Registers a listener to be called back on various events within the JIT. See JITEventListener.h for more details. Does not take ownership of the argument. The argument may be NULL, in which case these functions do nothing.

Reimplemented in llvm::MCJIT.

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

removeModule - Remove a Module from the list of modules. Returns true if M is found.

Reimplemented in llvm::MCJIT.

Definition at line 128 of file ExecutionEngine.cpp.

References llvm::SmallVectorTemplateCommon< T, typename >::begin(), clearGlobalMappingsFromModule(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorImpl< T >::erase(), I, and Modules.

virtual GenericValue llvm::ExecutionEngine::runFunction ( Function F,
const std::vector< GenericValue > &  ArgValues 
) [pure virtual]

runFunction - Execute the specified function with the specified arguments, and return the result.

Implemented in llvm::MCJIT, and llvm::Interpreter.

Referenced by runFunctionAsMain(), and runStaticConstructorsDestructors().

int ExecutionEngine::runFunctionAsMain ( Function Fn,
const std::vector< std::string > &  argv,
const char *const envp 
)

runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program.

Parameters:
isDtors- Run the destructors instead of constructors.

Reimplemented in llvm::MCJIT.

Definition at line 335 of file ExecutionEngine.cpp.

References Modules.

This method is used to execute all of the static constructors or destructors for a particular module.

Parameters:
isDtors- Run the destructors instead of constructors.

Definition at line 296 of file ExecutionEngine.cpp.

References llvm::WinEH::CE, llvm::dyn_cast(), F(), llvm::GlobalVariable::getInitializer(), llvm::Module::getNamedGlobal(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::isDeclaration(), llvm::Constant::isNullValue(), Name, and runFunction().

void llvm::ExecutionEngine::setDataLayout ( const DataLayout Val) [inline, protected]

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

Referenced by llvm::Interpreter::Interpreter().

virtual void llvm::ExecutionEngine::setObjectCache ( ObjectCache ) [inline, virtual]

Sets the pre-compiled object cache. The ownership of the ObjectCache is not changed. Supported by MCJIT but not the interpreter.

Reimplemented in llvm::MCJIT.

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

References llvm_unreachable.

virtual void llvm::ExecutionEngine::setProcessAllSections ( bool  ProcessAllSections) [inline, virtual]

setProcessAllSections (MCJIT Only): By default, only sections that are "required for execution" are passed to the RTDyldMemoryManager, and other sections are discarded. Passing 'true' to this method will cause RuntimeDyld to pass all sections to its RTDyldMemoryManager regardless of whether they are "required to execute" in the usual sense.

Rationale: Some MCJIT clients want to be able to inspect metadata sections (e.g. Dwarf, Stack-maps) to enable functionality or analyze performance. Passing these sections to the memory manager allows the client to make policy about the relevant sections, rather than having MCJIT do it.

Reimplemented in llvm::MCJIT.

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

References llvm_unreachable.

void llvm::ExecutionEngine::setVerifyModules ( bool  Verify) [inline]

Enable/Disable IR module verification.

Note: Module verification is enabled by default in Debug builds, and disabled by default in Release. Use this method to override the default.

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

References Verify.

Referenced by llvm::EngineBuilder::create().

Reimplemented in llvm::MCJIT.

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

void * ExecutionEngine::updateGlobalMapping ( const GlobalValue GV,
void *  Addr 
)

updateGlobalMapping - Replace an existing mapping for GV with a new address. This updates both maps as required. If "Addr" is null, the entry for the global is removed from the mappings. This returns the old value of the pointer, or null if it was not in the map.

Definition at line 202 of file ExecutionEngine.cpp.

References llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), lock, and llvm::ExecutionEngineState::RemoveMapping().


Friends And Related Function Documentation

friend class EngineBuilder [friend]

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


Member Data Documentation

ExecutionEngine *(* ExecutionEngine::InterpCtor)(std::unique_ptr< Module > M, std::string *ErrorStr) = nullptr [static, protected]
void*(* llvm::ExecutionEngine::LazyFunctionCreator)(const std::string &) [protected]

LazyFunctionCreator - If an unknown function is needed, this function pointer is invoked to create it. If this returns null, the JIT will abort.

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

Referenced by llvm::MCJIT::getPointerToNamedFunction(), llvm::MCJIT::getSymbolAddress(), and InstallLazyFunctionCreator().

ExecutionEngine *(* ExecutionEngine::MCJITCtor)(std::unique_ptr< Module > M, std::string *ErrorStr, RTDyldMemoryManager *MCJMM, std::unique_ptr< TargetMachine > TM) = nullptr [static, protected]
SmallVector<std::unique_ptr<Module>, 1> llvm::ExecutionEngine::Modules [protected]

The list of Modules that we are JIT'ing from. We use a SmallVector to optimize for the case where there is only one module.

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

Referenced by addModule(), emitGlobals(), ExecutionEngine(), FindFunctionNamed(), removeModule(), and runStaticConstructorsDestructors().


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