LLVM API Documentation

llvm::ExecutionEngine Class Reference

#include <ExecutionEngine.h>

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

List of all members.

Public Member Functions

virtual ~ExecutionEngine ()
virtual void addModuleProvider (ModuleProvider *P)
const TargetData * getTargetData () const
virtual Module * removeModuleProvider (ModuleProvider *P, std::string *ErrInfo=0)
virtual void deleteModuleProvider (ModuleProvider *P, std::string *ErrInfo=0)
Function * FindFunctionNamed (const char *FnName)
virtual GenericValue runFunction (Function *F, const std::vector< GenericValue > &ArgValues)=0
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 void runJITOnFunction (Function *, MachineCodeInfo *=0)
const GlobalValue * getGlobalValueAtAddress (void *Addr)
void StoreValueToMemory (const GenericValue &Val, GenericValue *Ptr, const Type *Ty)
void InitializeMemory (const Constant *Init, void *Addr)
virtual void * recompileAndRelinkFunction (Function *F)=0
virtual void freeMachineCodeForFunction (Function *F)=0
virtual void * getOrEmitGlobalVariable (const GlobalVariable *GV)
virtual void RegisterJITEventListener (JITEventListener *)
virtual void UnregisterJITEventListener (JITEventListener *)
void DisableLazyCompilation (bool Disabled=true)
bool isLazyCompilationDisabled () const
void DisableGVCompilation (bool Disabled=true)
bool isGVCompilationDisabled () const
void DisableSymbolSearching (bool Disabled=true)
bool isSymbolSearchingDisabled () const
void EnableDlsymStubs (bool Enabled=true)
 EnableDlsymStubs -.
bool areDlsymStubsEnabled () const
void InstallLazyFunctionCreator (void *(*P)(const std::string &))

Static Public Member Functions

static ExecutionEngine * create (ModuleProvider *MP, bool ForceInterpreter=false, std::string *ErrorStr=0, CodeGenOpt::Level OptLevel=CodeGenOpt::Default, bool GVsWithCode=true)
static ExecutionEngine * create (Module *M)
static ExecutionEngine * createJIT (ModuleProvider *MP, std::string *ErrorStr=0, JITMemoryManager *JMM=0, CodeGenOpt::Level OptLevel=CodeGenOpt::Default, bool GVsWithCode=true)
static void InstallExceptionTableRegister (void(*F)(void *))
static void RegisterTable (void *res)

Public Attributes

sys::Mutex lock

Protected Types

typedef void(* EERegisterFn )(void *)

Protected Member Functions

void setTargetData (const TargetData *td)
virtual char * getMemoryForGV (const GlobalVariable *GV)
 getMemoryforGV - Allocate memory for a global variable.
 ExecutionEngine (ModuleProvider *P)
void emitGlobals ()
void EmitGlobalVariable (const GlobalVariable *GV)
GenericValue getConstantValue (const Constant *C)
 Get a GenericValue for a Constant*.
void LoadValueFromMemory (GenericValue &Result, GenericValue *Ptr, const Type *Ty)

Protected Attributes

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

Static Protected Attributes

static ExecutionEngine *(* JITCtor )(ModuleProvider *MP, std::string *ErrorStr, JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, bool GVsWithCode)
static ExecutionEngine *(* InterpCtor )(ModuleProvider *MP, std::string *ErrorStr)
static EERegisterFn ExceptionTableRegister = 0

Friends

class EngineBuilder


Detailed Description

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


Member Typedef Documentation

typedef void(* llvm::ExecutionEngine::EERegisterFn)(void *) [protected]

ExceptionTableRegister - If Exception Handling is set, the JIT will register dwarf tables with this function


Constructor & Destructor Documentation

ExecutionEngine::~ExecutionEngine (  )  [virtual]

Definition at line 59 of file ExecutionEngine.cpp.

References clearAllGlobalMappings(), and Modules.

ExecutionEngine::ExecutionEngine ( ModuleProvider *  P  )  [explicit, protected]

Definition at line 50 of file ExecutionEngine.cpp.

References Modules.


Member Function Documentation

void llvm::ExecutionEngine::setTargetData ( const TargetData *  td  )  [inline, protected]

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

References TD.

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

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

getMemoryforGV - Allocate memory for a global variable.

Reimplemented in llvm::JIT.

Definition at line 65 of file ExecutionEngine.cpp.

References llvm::SequentialType::getElementType(), getTargetData(), llvm::GlobalValue::getType(), and llvm::TargetData::getTypeAllocSize().

Referenced by emitGlobals(), and EmitGlobalVariable().

ExecutionEngine * ExecutionEngine::create ( ModuleProvider *  MP,
bool  ForceInterpreter = false,
std::string *  ErrorStr = 0,
CodeGenOpt::Level  OptLevel = CodeGenOpt::Default,
bool  GVsWithCode = true 
) [static]

create - This is the factory method for creating an execution engine which is appropriate for the current machine. This takes ownership of the module provider.

If possible, create a JIT, unless the caller specifically requests an Interpreter or there's an error. If even an Interpreter cannot be created, NULL is returned.

Definition at line 394 of file ExecutionEngine.cpp.

References EngineBuilder, llvm::EngineKind::Interpreter, and llvm::EngineKind::JIT.

ExecutionEngine * ExecutionEngine::create ( Module *  M  )  [static]

create - This is the factory method for creating an execution engine which is appropriate for the current machine. This takes ownership of the module.

Definition at line 409 of file ExecutionEngine.cpp.

References EngineBuilder.

ExecutionEngine * ExecutionEngine::createJIT ( ModuleProvider *  MP,
std::string *  ErrorStr = 0,
JITMemoryManager *  JMM = 0,
CodeGenOpt::Level  OptLevel = CodeGenOpt::Default,
bool  GVsWithCode = true 
) [static]

createJIT - This is the factory method for creating a JIT for the current machine, it does not fall back to the interpreter. This takes ownership of the ModuleProvider and JITMemoryManager if successful.

Clients should make sure to initialize targets prior to calling this function.

createJIT - This is the factory method for creating a JIT for the current machine, it does not fall back to the interpreter. This takes ownership of the module provider.

Reimplemented in llvm::JIT.

Definition at line 197 of file JIT.cpp.

References llvm::JIT::createJIT().

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

virtual void llvm::ExecutionEngine::addModuleProvider ( ModuleProvider *  P  )  [inline, virtual]

addModuleProvider - Add a ModuleProvider to the list of modules that we can JIT from. Note that this takes ownership of the ModuleProvider: when the ExecutionEngine is destroyed, it destroys the MP as well.

Reimplemented in llvm::JIT.

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

References Modules.

Referenced by llvm::JIT::addModuleProvider().

const TargetData* llvm::ExecutionEngine::getTargetData (  )  const [inline]

Module * ExecutionEngine::removeModuleProvider ( ModuleProvider *  P,
std::string *  ErrInfo = 0 
) [virtual]

removeModuleProvider - Remove a ModuleProvider from the list of modules. Relases the Module from the ModuleProvider, materializing it in the process, and returns the materialized Module.

removeModuleProvider - Remove a ModuleProvider from the list of modules. Relases the Module from the ModuleProvider, materializing it in the process, and returns the materialized Module.

Reimplemented in llvm::JIT.

Definition at line 74 of file ExecutionEngine.cpp.

References clearGlobalMappingsFromModule(), E, llvm::ModuleProvider::getModule(), Modules, and llvm::ModuleProvider::releaseModule().

Referenced by llvm::JIT::removeModuleProvider().

void ExecutionEngine::deleteModuleProvider ( ModuleProvider *  P,
std::string *  ErrInfo = 0 
) [virtual]

deleteModuleProvider - Remove a ModuleProvider from the list of modules, and deletes the ModuleProvider and owned Module. Avoids materializing the underlying module.

deleteModuleProvider - Remove a ModuleProvider from the list of modules, and deletes the ModuleProvider and owned Module. Avoids materializing the underlying module.

Reimplemented in llvm::JIT.

Definition at line 91 of file ExecutionEngine.cpp.

References clearGlobalMappingsFromModule(), E, llvm::ModuleProvider::getModule(), and Modules.

Referenced by llvm::JIT::deleteModuleProvider().

Function * ExecutionEngine::FindFunctionNamed ( const char *  FnName  ) 

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.

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.

Definition at line 108 of file ExecutionEngine.cpp.

References F, and Modules.

Referenced by getPointerToNamedFunction().

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::Interpreter, and llvm::JIT.

Referenced by runFunctionAsMain(), and runStaticConstructorsDestructors().

void ExecutionEngine::runStaticConstructorsDestructors ( bool  isDtors  ) 

runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program, depending on the value of isDtors.

runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a program, depending on the value of isDtors.

Definition at line 312 of file ExecutionEngine.cpp.

References Modules.

void ExecutionEngine::runStaticConstructorsDestructors ( Module *  module,
bool  isDtors 
)

runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a module, depending on the value of isDtors.

runStaticConstructorsDestructors - This method is used to execute all of the static constructors or destructors for a module, depending on the value of isDtors.

Definition at line 273 of file ExecutionEngine.cpp.

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

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

runFunctionAsMain - This is a helper function which wraps runFunction to handle the common task of starting up main with the specified argc, argv, and envp parameters.

runFunctionAsMain - This is a helper function which wraps runFunction to handle the common task of starting up main with the specified argc, argv, and envp parameters.

Definition at line 332 of file ExecutionEngine.cpp.

References CreateArgv(), llvm::Function::getContext(), llvm::Type::getContext(), llvm::Function::getFunctionType(), llvm::Type::getInt32Ty(), llvm::Type::getInt8Ty(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::PointerType::getUnqual(), llvm::Type::getVoidTy(), llvm::APInt::getZExtValue(), llvm::GVTOP(), llvm::GenericValue::IntVal, isTargetNullPtr(), llvm::llvm_report_error(), llvm::PTOGV(), and runFunction().

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. After adding a mapping for GV, you must not destroy it until you've removed the mapping.

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.

Definition at line 122 of file ExecutionEngine.cpp.

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

Referenced by emitGlobals(), EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable(), llvm::JIT::getPointerToFunction(), and llvm::JIT::recompileAndRelinkFunction().

void ExecutionEngine::clearAllGlobalMappings (  ) 

clearAllGlobalMappings - Clear all global mappings and start over again use in dynamic compilation scenarios when you want to move globals

clearAllGlobalMappings - Clear all global mappings and start over again use in dynamic compilation scenarios when you want to move globals

Definition at line 142 of file ExecutionEngine.cpp.

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

Referenced by ~ExecutionEngine().

void ExecutionEngine::clearGlobalMappingsFromModule ( Module *  M  ) 

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

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

Definition at line 151 of file ExecutionEngine.cpp.

References llvm::Module::begin(), llvm::Module::end(), FI, GE, llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap(), llvm::Module::global_begin(), llvm::Module::global_end(), and lock.

Referenced by deleteModuleProvider(), and removeModuleProvider().

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.

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.

Definition at line 168 of file ExecutionEngine.cpp.

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

Referenced by llvm::JIT::freeMachineCodeForFunction().

void * ExecutionEngine::getPointerToGlobalIfAvailable ( const GlobalValue *  GV  ) 

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

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

Definition at line 210 of file ExecutionEngine.cpp.

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

Referenced by emitGlobals(), EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable(), llvm::JIT::getPointerToFunction(), llvm::JIT::getPointerToFunctionOrStub(), and llvm::JIT::recompileAndRelinkFunction().

void * ExecutionEngine::getPointerToGlobal ( const GlobalValue *  GV  ) 

getPointerToGlobal - This returns the address of the specified global value. This may involve code generation if it's a function. After getting a pointer to GV, it and all globals it transitively refers to have been passed to addGlobalMapping. You must clear the mapping for each referred-to global before destroying it. If a referred-to global RTG is a function and this ExecutionEngine is a JIT compiler, calling updateGlobalMapping(RTG, 0) will leak the function's machine code, so you should call freeMachineCodeForFunction(RTG) instead. Note that optimizations can move and delete non-external GlobalValues without notifying the ExecutionEngine.

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

Definition at line 458 of file ExecutionEngine.cpp.

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

Referenced by getOrEmitGlobalVariable().

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. See getPointerToGlobal for the requirements on destroying F and any GlobalValues it refers to.

Implemented in llvm::JIT.

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 getPointerToGlobal for the requirements on destroying F and any GlobalValues it refers to.

Reimplemented in llvm::JIT.

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

References getPointerToFunction().

Referenced by getConstantValue().

virtual void llvm::ExecutionEngine::runJITOnFunction ( Function *  ,
MachineCodeInfo *  = 0 
) [inline, virtual]

Reimplemented in llvm::JIT.

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

const GlobalValue * ExecutionEngine::getGlobalValueAtAddress ( void *  Addr  ) 

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

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

Definition at line 221 of file ExecutionEngine.cpp.

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

void ExecutionEngine::StoreValueToMemory ( const GenericValue &  Val,
GenericValue *  Ptr,
const Type *  Ty 
)

void ExecutionEngine::InitializeMemory ( const Constant *  Init,
void *  Addr 
)

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

recompileAndRelinkFunction - This method is used to force a function which has already been compiled to be compiled again, possibly after it has been modified. Then the entry to the old copy is overwritten with a branch to the new copy. If there was no old copy, this acts just like VM::getPointerToFunction().

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

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

freeMachineCodeForFunction - Release memory in the ExecutionEngine corresponding to the machine code emitted to execute this function, useful for garbage-collecting generated code.

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

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. See getPointerToGlobal for the requirements on destroying GV and any GlobalValues it refers to.

Reimplemented in llvm::JIT.

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

References getPointerToGlobal().

Referenced by getConstantValue().

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::JIT.

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

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

Reimplemented in llvm::JIT.

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

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

DisableLazyCompilation - If called, the JIT will abort if lazy compilation is ever attempted.

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

bool llvm::ExecutionEngine::isLazyCompilationDisabled (  )  const [inline]

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

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

bool llvm::ExecutionEngine::isGVCompilationDisabled (  )  const [inline]

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

Referenced by llvm::JIT::getMemoryForGV().

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

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

bool llvm::ExecutionEngine::isSymbolSearchingDisabled (  )  const [inline]

void llvm::ExecutionEngine::EnableDlsymStubs ( bool  Enabled = true  )  [inline]

EnableDlsymStubs -.

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

References Enabled.

bool llvm::ExecutionEngine::areDlsymStubsEnabled (  )  const [inline]

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

References LazyFunctionCreator.

static void llvm::ExecutionEngine::InstallExceptionTableRegister ( void(*)(void *)  F  )  [inline, static]

InstallExceptionTableRegister - The JIT will use the given function to register the exception tables it generates.

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

References ExceptionTableRegister, and F.

static void llvm::ExecutionEngine::RegisterTable ( void *  res  )  [inline, static]

RegisterTable - Registers the given pointer as an exception table. It uses the ExceptionTableRegister function.

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

References ExceptionTableRegister.

void ExecutionEngine::emitGlobals (  )  [protected]

void ExecutionEngine::EmitGlobalVariable ( const GlobalVariable *  GV  )  [protected]

GenericValue ExecutionEngine::getConstantValue ( const Constant *  C  )  [protected]

Get a GenericValue for a Constant*.

This function converts a Constant* into a GenericValue. The interesting part is if C is a ConstantExpr.

Definition at line 479 of file ExecutionEngine.cpp.

References llvm::APFloat::add(), llvm::APIntOps::And(), llvm::lltok::APFloat, BitCast, llvm::APFloat::bitcastToAPInt(), llvm::APInt::bitsToDouble(), llvm::APInt::bitsToFloat(), llvm::APFloat::convertFromAPInt(), llvm::APFloat::convertToInteger(), llvm::APFloat::divide(), llvm::APInt::doubleToBits(), llvm::Type::DoubleTyID, llvm::GenericValue::DoubleVal, F, llvm::APInt::floatToBits(), llvm::Type::FloatTyID, llvm::GenericValue::FloatVal, llvm::Type::FP128TyID, FPToUI, FPTrunc, llvm::APInt::getBitWidth(), llvm::Type::getContext(), llvm::Value::getContext(), llvm::Type::getDoubleTy(), llvm::Type::getFloatTy(), llvm::TargetData::getIndexedOffset(), llvm::Type::getInt32Ty(), llvm::Type::getInt64Ty(), getOrEmitGlobalVariable(), llvm::TargetData::getPointerSizeInBits(), getPointerToFunctionOrStub(), llvm::Value::getType(), llvm::Type::getTypeID(), llvm::Type::getX86_FP80Ty(), llvm::APInt::getZExtValue(), GV, llvm::Type::IntegerTyID, llvm::GenericValue::IntVal, llvm::Type::isFloatingPoint(), LHS, llvm::llvm_report_error(), llvm_unreachable, llvm::APFloat::mod(), llvm::APFloat::multiply(), Offset, llvm::APIntOps::Or(), llvm::Type::PointerTyID, llvm::GenericValue::PointerVal, llvm::Type::PPC_FP128TyID, llvm::PTOGV(), PtrToInt, RHS, llvm::APFloat::rmNearestTiesToEven, llvm::APFloat::rmTowardZero, llvm::APIntOps::RoundDoubleToAPInt(), llvm::APIntOps::RoundFloatToAPInt(), llvm::APInt::roundToDouble(), llvm::APInt::sdiv(), llvm::APInt::sext(), llvm::Attribute::SExt, llvm::APInt::signedRoundToDouble(), llvm::APInt::srem(), llvm::raw_string_ostream::str(), llvm::APFloat::subtract(), llvm::APInt::trunc(), llvm::APInt::udiv(), UIToFP, llvm::APInt::urem(), llvm::Type::X86_FP80TyID, llvm::APIntOps::Xor(), zero, llvm::APInt::zext(), ZExt, and llvm::APInt::zextOrTrunc().

Referenced by InitializeMemory().

void ExecutionEngine::LoadValueFromMemory ( GenericValue &  Result,
GenericValue *  Ptr,
const Type *  Ty 
) [protected]


Friends And Related Function Documentation

friend class EngineBuilder [friend]

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

Referenced by create().


Member Data Documentation

Modules - This is a list of ModuleProvider's that we are JIT'ing from. We use a smallvector to optimize for the case where there is only one module.

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

Referenced by llvm::JIT::addModuleProvider(), addModuleProvider(), llvm::JIT::deleteModuleProvider(), deleteModuleProvider(), emitGlobals(), ExecutionEngine(), FindFunctionNamed(), llvm::JIT::getPointerToFunction(), llvm::JIT::removeModuleProvider(), removeModuleProvider(), runStaticConstructorsDestructors(), and ~ExecutionEngine().

ExecutionEngine *(* ExecutionEngine::JITCtor)(ModuleProvider *MP, std::string *ErrorStr, JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, bool GVsWithCode)=0 ( ModuleProvider *  MP,
std::string *  ErrorStr,
JITMemoryManager *  JMM,
CodeGenOpt::Level  OptLevel,
bool  GVsWithCode 
) [static, protected]

ExecutionEngine *(* ExecutionEngine::InterpCtor)(ModuleProvider *MP, std::string *ErrorStr)=0 ( ModuleProvider *  MP,
std::string *  ErrorStr 
) [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.

Referenced by llvm::JIT::getPointerToNamedFunction(), and InstallLazyFunctionCreator().


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